4 ms·
This article left me wanting, in terms of understanding why (or when) you'd want to have the server or proxy cache return a 304 (Not Modified) - I've been opera
by seriocomic 10y ago
This article left me wanting, in terms of understanding why (or when) you'd want to have the server or proxy cache return a 304 (Not Modified) - I've been operating under the understanding that "the best request is one that is never made".
Given a complex web page with a large number of HTTP requests (especially now that bundling of assets is considered an anti-pattern with HTTP/2), that the latency introduced by all those repeated requests that end up returning a 304 are redundant if we can serve them directly from the client. Most caching tutorials seem to skip this area.
- Deinumite 10y agoIt doesn't make as much sense for a webpage, but a 304 can be effective for an API. Say you have a resource that needs to be checked periodically, returning a 304 still has the overhead of a tcp connection but not the weight of the payload.
- deleted 10y ago[deleted]