| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
| 
 | 
||||||||||
| X-Cart Home | 
How to make browsers refresh browser cache on updated website? | |||
![]()  | 
	
	
		
			 | 	
	
||
| 
		 | 
	Thread Tools | Search this Thread | 
| 
		 
			 
			#1  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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 
				__________________ 
		
		
		
		
	
		
		
		
	Version 4.7.7  | 
|||||||
| 
		 
			 
			#2  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 Have up run cleanup.php 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	Version 4.7.2  | 
|||||||||
| 
		 
			 
			#3  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 Perhaps configure a cronjob to run cleanup.php every couple of days? 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk  | 
|||||||||
| 
		 
			 
			#4  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	Version 4.7.7  | 
|||||||
| 
		 
			 
			#5  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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/ 
				__________________ 
		
		
		
		
	
		
		
		
	Thomas / USA XCart V4.4.5 Gold XCart Mobile V1.4.12 XCart X-PDF XCart X-HotProducts AlteredCart Checkout One (One Page Checkout) BCSE Back In Stock CFL Holiday Message CFL System Message Smack Digital (WebsiteCM) Remember Anon Carts xcartmods Testimonials xcartmods reCAPTCHA for X-Cart Classic Unix, PHP 7.0 (patched 5.4). MySQL 5.6  | 
|||||||
| 
		 
			 
			#6  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 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 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	Steve Stoyanov CFLSystems.com Web Development  | 
|||||||||
| 
		 
			 
			#7  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 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 
				__________________ 
		
		
		
		
	
		
		
		
	Version 4.7.7  | 
|||||||
![]()  | 
		
	
		
			 | 	
	
| Thread Tools | Search this Thread | 
		
  | 
	
		
  | 
| 
 | 
|||
| 
 
X-Cart forums © 2001-2020
 
 | 
|||