views:

25

answers:

1

When Chrome loads my website, it checks the server for updated versions of files before it shows them. (Images/Javascript/CSS) It gets a 304 from the server because I never edit external javascript, css or images.

What I want it to do, is display the images without even checking the server.

Here are the headers:

Connection:keep-alive    
Date:Tue, 03 Aug 2010 21:39:32 GMT    
ETag:"2792c73-b1-48cd0909d96ed"    
Expires:Thu, 02 Sep 2010 21:39:32 GMT    
Server:Apache/Nginx/Varnish

How do I make it not check the server?

A: 

If you want Chrome to cache your JS/CSS files - the server will need to set a "Cache-Control" header. It should look like:

Cache-Control:max-age=86400 (if you want to cache resources for a day).

Rahul
Thanks for the reply. Here are the new headers:Cache-Control:max-age=2592000Connection:keep-aliveDate:Tue, 03 Aug 2010 21:57:36 GMTETag:"2792c73-b1-48cd0909d96ed"Expires:Thu, 02 Sep 2010 21:57:36 GMTServer:Apache/Nginx/Varnishbut it still doesn't work. Chrome still checks the server for modifications.
Roger
How are you making sure that Chrome checks the server for modifications ? Are you using something like Fiddler ?
Rahul