Sharepoint Branding Not Changing on Client PCs until they Ctrl-F5 their browser.

We are having an issue where we have updated our branding by deploying a custom feature.   None of the client machines show the branding change unless they Ctrl-F5 on the screen.   The feature was deployed a week ago and still client machines have the old branding unless they Ctrl-F5.

February 24th, 2012 7:38pm

Hi,

Maybe a problem with the browser cache?

Regards,

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2012 8:10pm

The problem exists across multiple machines and multiple browsers.   IE (8&9), Firefox, and Safari.  

The only thing consistant is the site.

February 24th, 2012 8:19pm

Hi John,

The reason for the issue is the first time a file is requested, the web server with a HTTP header which specifies that will be cached for a long time. Then Browsers and proxies typically obey this, so on subsequent page requests, this file will pulled from Temporary internet files.

As a solution, please add/change a query string value on each deployment like

your custom style file: /_layouts/Project/Styles/CustomStyle.css

We need modify it to something like this:

/_layouts/Project/Styles/CustomStyle.css?Rev=1.0
/_layouts/Project/Styles/CustomStyle.css?Rev=2.0

Here is a nice blog descripted this issue.
http://www.sharepointnutsandbolts.com/2011/11/avoiding-bugs-from-cached-javascript.html

Best regards,
Emir

Free Windows Admin Tool Kit Click here and download it now
February 27th, 2012 11:57am

We're having a similar issue to this in O365 but it does not appear to be the same thing. Our custom CSS/JS files are loading fine all the time but the Themed styles are not loading... sometimes. So here's the scenarios:

1. Navigate to Home - Themes not applied
2. CTRL+F5 - Themes loaded correctly
3. Click a link in menu for another page - Themes not applied
4. CTRL+F5 - Themes loaded correctly
5. Navigate back to Home - Themes not applied <-- This proves IMO that this is not a case of a version reference issue
6. CTRL+F5 - Themes loaded correctly
...

Things I notice that are different in the Theme applied vs. Theme not applied scenarios:
1. In F12 tools the style elements expand out to show actual styles in the Elements view for scenarios where the themes DO load while they do not contain a copy of the styles in the Elements view when themes DO NOT load correctly.
2. One of our custom CSS references has the HTML encoded value &#65279; inside the style element in the Elements view in F12 tools for the page after CTRL+F5 but not before CTRL+F5.
3. All other attributes of the style and link elements look the same.

Any ideas? This is a publishing site with a custom master page (based off the Bootstrap 3 master page). It's all been working without issues until earlier this week and there are no changes that we haven't tried backing out to see if it is something we changed.

All these behaviors were observed in Chrome. Testing with IE has even worse behavior in that CTRL+F5 has no affect at all. The Theme styles are never applied in IE.


  • Edited by wentzelm Thursday, July 02, 2015 4:32 PM
July 2nd, 2015 4:27pm

further looking at the markup for the themed stylesheet in dev tools shows that what appeared to be an encoded block inside the style element when the styles are applied correctly (#2, #4, #6...) is actually font references in class markup whereas when the cases where styles do not get applied correctly (#1, #3, #5...) does not contain any markup but the contents of the css stylesheet file, referenced with URL /_layouts/15/1033/styles/Themable/corev15.css?rev=1CytE7p5edthSZSYy6pp8A%3D%3DTAG15 in both sets of cases, are exactly the same.
Free Windows Admin Tool Kit Click here and download it now
July 6th, 2015 4:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics