3 ms·
It’s often not that easy to figure out the last modified when serving up a web page. There might be multiple DB records for that page. Hashing the page into an
by logankeenan 3y ago
It’s often not that easy to figure out the last modified when serving up a web page. There might be multiple DB records for that page. Hashing the page into an etag often easier to implement.
- idbehold 3y agoSure, I was simply pointing out that one doesn't need to implement ETags to have 304 responses.
- gnz11 3y agoI mean sure, technically you can send any status code from your origin application. ETag is generally the standard way to go about it with regards to web servers. Last-Modified is more of a fallback mechanism.
- idbehold 3y agoActing like Last-Modified is somehow substandard is a bit disingenuous. The If-None-Match (etag) request header takes priority over the If-Modified-Since (last-modified) request header (if both are sent), but they provide identical functionality (caching and preventing modification if out of date) and are both part of the HTTP standard.