we have a solution with a Module for static files. In elements.xml we would add each file like this

<Module Name="Files" Url="Style Library" RootWebOnly="True">
  <File Path="Files\css\design.css" Url="css/design.css" Type="GhostableInLibrary" />

The problem is that when updating the file the E-Tag is not always updated, for instance if we ask for If-None-Match: "{C51DBB4F-B5EE-4826-9960-864EF6FA967C},1" we get 304 NOT MODIFIED, because this is what the old file had, but the new file responds with E-Tag: "{C51DBB4F-B5EE-4826-9960-864EF6FA967C},1" which is the same as the old.

We do not use CssRegistration

2 Answers 2


Note also that even for files which are not being updated, SharePoint 2007 had an interesting behaviour around HTTP 304s and anonymous users. You may know that BLOB caching is required with a max-age attribute to ensure that the correct 'expires' header is sent (the first time round) with the files - otherwise the browser re-requests and gets a 304 for every file. In 2007 the bug was that even with this config, 304s would be sent to anonymous users for some libraries (including the Style Library you appear to be using).

I understood (but haven't checked) that this was fixed in 2010, but you might want to be aware of it if you're looking at things in that area.

My post More on optimization, HTTP 304s etc has more info..

  • Hey Chris. This does sound much like the issue we have. We run 2010 though, so it seems a bit strange. I'll look into it and get back to this question. Thanks a lot
    – eirikb
    Commented Jan 14, 2011 at 12:41

File updates via modules aren´t actually updated in SharePoint, you have to update it through code. See my post at http://johanleino.wordpress.com/2009/04/22/howto-handling-file-updates-in-sharepoint/

  • Thanks for you answer. Although the file is actually updated, if we do not provide "If-None-Match" we get the file, which is the new one. It's just that "NOT MODIFIED" will not return the file at all, as expected. But with your hack SharePoint will know it's a new file?
    – eirikb
    Commented Jan 14, 2011 at 10:37
  • @eirikb - ah, I was thinking about the actual contents of the file. I at least had some issues with that in 2007. This won´t help you in this situation I think Chris is on to something though...I know some colleagues of mine discussed something about the style library in 2007 but I couldn´t find that conversion in my outlook...sorry Commented Jan 14, 2011 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.