0

I have the following strange behaviour when using Sharepoint Designer to edit files on my sharepoint:

  1. I upload a new CSS-File.
  2. I use said file in a script editor -> everything is fine
  3. I change the CSS file in Sharepoint Designer -> change gets applied
  4. I change the file again in Sharepoint Designer -> no change visible
  5. Repeat 4 inifinite times
  6. Next morning -> change applied (maybe earlier, but I usually just ragequit till the next morning)

The CSS is in the Style Library. But it doesnt matter, happens in each and every folder of my site. In the style library version control is disabled by default. In the web interface it says "Last modified: A few seconds ago" which is correct. If I click on the file it shows me the unmodified version. If I check the response headers from the HTTP-Request it says "Last-Modified: <time of first change>". So while somewhere it seems to have stored the correct change date the server somehow still sends me the old version.

Other people that first visit the site see the new version, if I change it they keep seeing the first version they have encountered. As this is in all browsers (so changing the browser between first and next visit) it is not cache related (i tried with deleting the cache of course).

Minimal dowload strategy is disabled (one of the first things i do every time i create a new site). Could it be another 'super' feature that is enabled that causes version control to go nuts even if there aint no version control? Could it be an issue of the server (sadly i have no access to the server but then i could just dump it to IT :D)?

1

Next time you make changes to your CSS file, create your own rev/version tag where the CSS file is being referenced (probably your Master Page). This way the browser will break the cached CSS and re-retrieve thinking it's a new file.

ex.

  <link href="/styles/style.css?rev=03_27_2014_v1" type="text/css" rel="stylesheet" />
  • Do you think its a browser caching issue? As written above if I open the page in chrome and lets say I see the currently correct version and then change it and open it in Firefox or IE I also see the old version not the new one even if those never accessed the site before. Also the HTTP-Header from the server tells a wrong Last-Modified date which confuses me a bit. – Muepe Mar 27 '14 at 15:04
  • if you see the correct version on your browser is not a problem related with sharepoint. Actually Sharepoint just send the files that you deploy – Salvatore Di Fazio Mar 27 '14 at 15:13
  • @Muepe Browsers do have the tendencies to cache CSS, JS and images. In your scenario, all the browsers should show the same result provided they are being accessed for the first time. There was similar caching issue talked about on O365 forum (community.office365.com/en-us/forums/154/t/199527.aspx) The rev method I stated above was from Chris O' Brien (sharepointnutsandbolts.com/2011/11/…) – Aveenav Mar 27 '14 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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