Re:Building a Shop with Sub-Second Page Loads: Lessons Learned
by DivineTraube on Sunday October 23, 2016 @03:44PM
(#12775086)
All major browsers do respect the TTL if one is set. So it does save many requests. If it's not possible to the the TTL because the content might change at any time it is still useful to a caching header with a TTL of 0. Otherwise the browser will perform heuristic caching and compute a (often imprecise) estimation based on the last-modified header.
That's a common (mis)assumption, but that's not how it works in practise. Sorry ^^
I cannot comment on what was the intended behavior when HTTP caching and headers were first designed, a very long time ago.
It seems to me, that is was "request everytime + get 304 if not modified, thus save the file transfer time". That's how most implementations work in my experience.
Historically, transfer duration was way more problematic than latency. It's only recently that there are pages with hundreds of dependencies.
---
Rails and webservers: They MUST change the filename or the application will be fucked because of caching issues, mostly because of Firefox :D