Force users cache to clear?

Hi there,

I have updated a webpage and it appears that some users are still seeing the older version of the page. Is there a way I can force the user’s version of the page to display the latest version?

I have looked into using CSS versioning and adding the following meta tag to the :

<meta http-equiv="cache-control" content="no-cache" />

I guess using mystyle.css?ver1.0 will force the CSS to clear, but will the meta tag only come into affect after the user has downloaded the page with it on? For example, if I add the meta tag to the page, then upload it, will the user see the latest version, or will they have to refresh the page for the meta tag to then kick in for future visits?

Any other help on displaying the latest version of content would be great!

Thanks!

mystyle.css?v=1 works just as well. We cache the timestamps of when the last time the file was modified and use that. So it looks like style.css?v=1420815512000.

If you’re using apache, look at this:

http://httpd.apache.org/docs/2.0/mod/mod_expires.html

It helps control cache, but you should have it set to at least a week or 2, and use file fingerprinting like above.

This is good reading: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching

If you are going to use that header command then actually placing it in the http header rather than using an http-equiv would be a good idea as by the time browsers read http-equiv commands it is often too late to apply them.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.