Developer forum

Forum » CMS - Standard features » Cache dependency on css files

Cache dependency on css files

Magni J. Hansen
Reply
We often experience that css files modifications are not visible for endusers.

What dependencies do DW have on css files ?

I know we can set ?time=globaltag on css link, but this should be handled by DW system.
 

Replies

 
Morten Bengtson
Reply
Try CTRL + F5 ;-)

Your css is cached by the browser and that is actually a good thing. Most sites will be configured so that browsers cache as much as possible to make the site faster. 
This caching "problem" has very little to do with Dynamicweb as it is controlled by server settings. You can use Dynamicwebs built in resource handler, where caching is controlled by Dynamicweb - http://volpav.wordpress.com/2011/03/28/combine-and-compress-your-stylesheet-and-script-files/

Another way to avoid the problems you are experiencing is to have someone change the caching settings on the server or you can start versioning your css files by changing the file names (e.g. style-1.5.css).

https://developers.google.com/speed/docs/best-practices/caching

http://developer.yahoo.com/performance/rules.html#expires

BR.
Morten

 

You must be logged in to post in the forum