Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> There's no Expires header being set, so your browser is not caching these images.

That is not in the slightest correct.

It has both a Last-Modified and an Etag so it's definitely cached.

> A full roundtrip to the HN server to get back the "content hasn't changed" status code (304) is required for each.

Also incorrect. The roundtrip is done once per session. A session is not well defined, but it's basically till you close the browser or till you click reload. Merely clicking on other stories will not trigger another roundtrip.

(Also pressing enter on the url line will not trigger a roundtrip, but reload will. This is important sometimes.)



> It has both a Last-Modified and an Etag so it's definitely cached.

Even without that, it'd still be cached: pretty much all browsers will cache things by default.

Last-Modified and Etag only come into play when the internal cache expires (this expiration time can be configured with the HTTP/1.0 Expires header or the HTTP/1.1 Cache-Control: max-age attribute, but the timeout does not default to "don't cache anything").




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: