Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

Cache Busting with SharePoint Online (Wave 15)

$
0
0

Hi

 

I am having lots of fun and games with custom css files being cached within SharePoint Online and not being updated when I change the css file.

 

If this was a on-premise SharePoint 2013, no problem just do this -

Cache busting for CssLink

 

When using CssRegistration the files need to be relative to the Layouts
folder, more specifically LAYOUTS\1033\STYLES\{CssFile}.

 

2/20/2013-CacheBusting-01.png

 

2/20/2013-CacheBusting-02.png

 

If you do not keep the files in the LAYOUTS\1033\STYLES then you will receive
an error

 

2/20/2013-CacheBusting-03.png

 

Below is the rendered html output of the CssRegistration tag above

 

2/20/2013-CacheBusting-04.png

 

 

However, with SharePoint online you cannot access  _layouts/15/1033/styles - you get a "403" error - the user must login.  I am already logged in as the site collection administrator so there must be another way of accessing this directory so that the Cache busting will work.  Anybody got any ideas which directories / folders will work with cache busting.  I want to be able to add ?Rev=1.0.0 onto the end of my css file so that if the Rev changes, SharePoint will recognise that this is a new version of the file and will clear the old one out of the cache and put the new one into the cache.  Alternatively, if SharePoint Online can do it for me even better.

Regards

 

Nigel 

 


Nigel Price NJPEnterprises


Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>