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_f147fecdd158f5595b03e2f9331716a5/

In the first view, these requests(served via Internap CDB) are listed as cachable while in the repeat they arent.




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

HTTP/1.0 200 OK Date: Wed, 09 Jun 2010 13:00:54 GMT Expires: Mon, 19 Jul 2010 13:00:54 GMT Server: nginx/0.7.65 Content-Type: image/gif Content-Length: 6133 Last-Modified: Sun, 05 Nov 2006 06:25:24 GMT Cache-Control: max-age=3456000 Vary: Accept-Encoding Cache-Control: max-age=3456000, public Accept-Ranges: bytes X-Origin-Date: Tue, 08 Jun 2010 14:45:49 GMT X-Origin-Expires: Sun, 18 Jul 2010 14:45:49 GMT X-Cache-Age: 78637 X-Cache: HIT from cdce-nym011-015.nym011.internap.com X-Origin-Date: Wed, 09 Jun 2010 12:36:26 GMT X-Origin-Expires: Mon, 19 Jul 2010 12:36:26 GMT X-Cache-Age: 1468 X-Cache: HIT from cdce-nym011-015.nym011.internap.com Via: 1.1 cdce-nym011-015.nym011.internap.com:1082 (squid/2.7.STABLE7), 1.0 cdce-nym011-015.nym011.internap.com:80 (squid/2.7.STABLE7) Connection: keep-alive

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

Found a doc on it here: Aprovechar el almacenamiento en caché de los navegadores  |  PageSpeed Insights  |  Google Developers

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.

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.[hr]
ok fixed using nginx’s gzip_vary directive

http://wiki.nginx.org/NginxHttpGzipModule#gzip_vary

this only adds vary to gzipable stuff