static resources not cached?
|
03-20-2013, 02:15 AM
Post: #1
|
|||
|
|||
static resources not cached?
Hallo,
first of all: "wonderful tool!" :-) Second, I have a test where I see requests to static content in a repeat view, where I've expected the browser to cache the *.js, *.css and *.png files: http://www.webpagetest.org/result/130319_58_WNR/ Can someone spot, why the resources are not cached? TIA Torsten |
|||
03-23-2013, 11:53 AM
(This post was last modified: 03-23-2013 12:09 PM by sbardoux.)
Post: #2
|
|||
|
|||
RE: static resources not cached?
Same here, I've been running testing for a couple of month, it's only recently (around some default setting have changed) that the contents are no longer cached, I haven't seen much setting to toggle it so my guess is that our host only can control that.
Would be really nice to have it working like before. Thanks PS: I was using Dulles defaults, I switch to Chicago and the browser is caching content, I guess the settings are not the same. This tool is really awesome !! |
|||
03-23-2013, 08:57 PM
Post: #3
|
|||
|
|||
RE: static resources not cached?
I just saw, that the cloudfront server responses with HTTP 1.0. Maybe that's the reason, that the IE is more conservative.
|
|||
03-27-2013, 12:00 AM
Post: #4
|
|||
|
|||
RE: static resources not cached?
It looks like there are 2 sets of cache-control headers in the responses:
Code: Cache-Control: max-age=31536000, public I haven't done much testing with a field-specific no-cache setting before but I wouldn't be surprised if that was causing the issue. |
|||
03-27-2013, 05:57 AM
Post: #5
|
|||
|
|||
RE: static resources not cached?
Hm, and in my case that header is served via a cdn where cookies aren't set anyway. Thanks for pointing that out, I will try to get rid of the second Cache-Control header.
|
|||
04-10-2013, 03:03 AM
Post: #6
|
|||
|
|||
RE: static resources not cached?
Hi,
I boiled this down a little bit and thought maybe someone came across the same issue. My setting is a home grown http server running a rails application on a EC2 server. Before that server is a load balancer with Session-Stickiness enabled. To serve static files, CloudFront is used and configured to use the load balancer as orgin server. Because of the session stickiness, the LB adds the ´Cache-Control: no-cache="set-cookie"´ to the response. The orgin server serves the files with the ´Cache-Control: max-age...´ header. According to the http 1.1 rfc, the headers are fine and must be read like one header with 3 values. One the other hand, the CloudFront server is using http 1.0 and IE9 seems to ignore the first header. With IE10 this seems to be fixed. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)