X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to make browsers refresh browser cache on updated website? (https://forum.x-cart.com/showthread.php?t=68857)

zebu 03-13-2014 04:47 PM

How to make browsers refresh browser cache on updated website?
 
Hi All,

We just updated the skin on our website. (all new look) What we are finding is that when viewing in a web browser that has previously viewed the site recenty, - the site looks all screwed up until you do a ctrl + F5 to do a page refresh.

Obviously the browsers are looking to a local cache first. 2 days on and customers still have issues. I figured any cached files in browsers - would time out by now.

Is their a way to put some code on the page, to force the browser to bypass the local cache and get a new copy (at least just for the homepage to pull in the correct css files.???
Thanks

Petepots 03-14-2014 04:23 AM

Re: How to make browsers refresh browser cache on updated website?
 
Have up run cleanup.php

chamberinternet 03-14-2014 09:11 AM

Re: How to make browsers refresh browser cache on updated website?
 
Perhaps configure a cronjob to run cleanup.php every couple of days?

zebu 03-14-2014 10:18 AM

Re: How to make browsers refresh browser cache on updated website?
 
Cleanup.php doesnt seem to resolve - because that cleans the cache up on the server - but not the cache on a local pc. The dispaly issue is because the local browser must have kept some sort of cache of local files from the last visit, which still obviously has some local cached components of the 'old' site.

Thomasb134 03-14-2014 12:09 PM

Re: How to make browsers refresh browser cache on updated website?
 
Some chatter about it here:
http://stackoverflow.com/questions/1922910/force-browser-to-clear-cache

and here:
http://fatherofcents.com/clear-browser-cache-using-html-or-php/

cflsystems 03-14-2014 09:41 PM

Re: How to make browsers refresh browser cache on updated website?
 
Use htaccess and Expires header. YOu can set which file types expire when - this tells the browser if they need to download fresh from the server or use the local cache

zebu 03-21-2014 01:58 PM

Re: How to make browsers refresh browser cache on updated website?
 
Steve:

Htacces with expires header - would that be this code:

ExpiresActive On Expires
Default A1
Header append Cache-Control must-revalidate

And which .htaccess file would that go in - the one in the root of the /skin folder?

Thanks in advance


All times are GMT -8. The time now is 05:36 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.