1

I have successfully deployed an Image Slider but have been asked to update some of the CSS styles.

I have been trying to change some of the styles (size of containers mainly) however any changes I make are not being shown in the page, I have even tried applying a background-color to something really obvious however this also doesn't get applied.

When using developer tools (IE10 and Chrome) I can see the CSS styles applied to DIV's are the old style, in Chrome I can see that the URL of the CSS file has a ctag attribute applied - http://sharepoint/style%20library/slider/css/global.css?ctag=219$$15.0.4719.1000.

I have seen other people mention that this is due to BLOB cache and have seen suggestions to perform a CTRL + F5, iisreset, and flushing the BLOB cache but neither of these have made any difference.

I have also created a new CSS file via SharePoint Designer and copied the updated styles to this new file and tried changing the Control_SlideImage.html masterpage to use this new CSS file but this didn't work so I renamed the old global.css to global.css.bak and renamed the new file to global.css but this still was referring to the old global.css file.

I have also seen people mention that they experienced a delay of about 24 hours after making the changes before they are visible, I do not experience this.

Can anyone assist with any suggestions on what is happening and possibly how I can fix it so that I can immediately see the changes?

2
  • Clear catch in your browser and then try. Nov 19, 2015 at 4:34
  • How did you link to the css file in the masterpage? Is the slider used on multiple pages or just one. I've successfully branded the slider you are referring to multiple times, but I've always added my own css file in style library to make the changes.. With css you will get the changes immediately because it is the browsers tool to order the html elements (after a refresh ctrl + F5.).
    – Andreas
    Nov 19, 2015 at 12:34

2 Answers 2

4

Force reload of the CSS file with a CEWP on the page to load

<link  
     rel='stylesheet' 
     href='http://sharepoint/style library/slider/css/global.css?Gimme=TheLastVersion'>

That file is in no cache.

But I think you are getting the latest Published version from the Style Library... and not your newer minor version

2
  • +1 for checking that you have published a major version. (That's why I prefer Site Assets over Style Library - no publishing step required.) Nov 19, 2015 at 15:43
  • 1
    Conceptually the Site Assets library is for Site Owners, I prefer to stuff Design content in the Style Library; disable publishing as we work on design, turn it on once we leave. In SP2007 Designer I had a macro which did an Auto-Check In/Published... don't know if it is still possible in SPD2013.. I use other tools now... and to be complete.. I try to avoid the Style Library for generic stuff and use the ContentType Hub as CDN Nov 19, 2015 at 16:01
0

You can try the tips mentioned in below link: http://www.sharepointnutsandbolts.com/2011/11/avoiding-bugs-from-cached-javascript.html

1
  • 2
    Please do not post link-only answers. Try to instead include the relevant parts from the link in your answer, and use the link as a source Nov 19, 2015 at 7:11

Your Answer

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

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