My application.js file name looks like application-b600352536291bc180983d43e6a2407f.js. Thus, its name uses the md5 bit cache. I set the maximum age setting for static assets to 1 hour config.static_cache_control = "public, max-age=3600". But I observe that the browser does not respect the title max-ageand always revises it from the server and makes a round trip for 304 Not Modified. How can I save a round trip?
Request Headers
Request URL:https://blah.com/assets/application-b600352536291bc180983d43e6a2407f.js
Request Method:GET
Status Code:304 Not Modified
Request Headersview source
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
If-Modified-Since:Sun, 12 Feb 2012 07:36:16 GMT
Answer Headers
Cache-Control:public, max-age=3600
Connection:keep-alive
Date:Sun, 12 Feb 2012 18:27:48 GMT
Last-Modified:Sun, 12 Feb 2012 07:36:16 GMT
Server:nginx
Vary:Accept-Encoding
Via:1.1 varnish
X-Varnish:499878183
source
share