False negative? - FAILED (No max-age or expires)
|
06-10-2010, 12:05 AM
Post: #1
|
|||
|
|||
False negative? - FAILED (No max-age or expires)
Ive been playing with webpagetest for last few weeks, but from last 2 - 3 days i have a strange issue.
The result in discussion is at http://www.webpagetest.org/result/100609...9331716a5/ In the first view, these requests(served via Internap CDB) are listed as cachable while in the repeat they arent. http://i.ticdn.com/header_bg.gif http://i.ticdn.com/menu_bg.gif http://i.ticdn.com/side_bg.gif http://i.ticdn.com/tab_bg.gif Firefox 3.6.6pre does not check for these files for each view (checked wia firebug). Neither does IE6 (monitored activity via wireshark) ... I havent tested this in IE7 or 8 yet . I think the only change i did was to add "Vary: Accept-Encoding" header so that only gzip compatible browsers get gziped content... FYI here are the headers for http://i.ticdn.com/header_bg.gif Code: HTTP/1.0 200 OK cdnplanet.com: We help you select the right CDN |
|||
06-10-2010, 12:17 AM
Post: #2
|
|||
|
|||
RE: False negative? - FAILED (No max-age or expires)
How did you do your IE6 repeat view test (did you close and re-open the browser)?
Aaron Peters bumped into this the other day and was going to work on a blog article about it but it turns out that if you add a vary header for the content encoding but don't gzip the actual content IE will not honor the cache. In other words, it works fine for text that gets gzipped but don't add the header to image responses. -Pat |
|||
06-10-2010, 12:20 AM
Post: #3
|
|||
|
|||
RE: False negative? - FAILED (No max-age or expires)
Found a doc on it here: http://code.google.com/speed/page-speed/...ching.html
Set the Vary header correctly for Internet Explorer. Internet Explorer does not cache any resources that are served with the Vary header and any fields but Accept-Encoding and User-Agent. To ensure these resources are cached by IE, make sure to strip out any other fields from the Vary header, or remove the Vary header altogether if possible I need to add a check to pagetest to detect the vary header and fail those assets. |
|||
06-10-2010, 12:25 AM
(This post was last modified: 06-10-2010 01:08 AM by sajal.)
Post: #4
|
|||
|
|||
RE: False negative? - FAILED (No max-age or expires)
aha seems like ill have to not put the vary header for non-text files....
For the IE6 test i did it in a vm and monitoring the http using Wireshark. Did a CRTL+R to force reload. saw all files being fetched, then just pressed enter on the addressbar. Now after reading your response i tried the refresh icon, IE6 sent the if-modified-since requests again... so confirmed this is IE issue and not webpagetest... Now i need to search on how to set headers based on types in Nginx... will report back if Vary fixes it or not. ok fixed using nginx's gzip_vary directive http://wiki.nginx.org/NginxHttpGzipModule#gzip_vary this only adds vary to gzipable stuff cdnplanet.com: We help you select the right CDN |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)