"Here be dragons..."
HTTP caching occurs when the browser stores local copies of web resources for faster retrieval the next time the resource is required. As your application serves resources it can attach cache headers to the response specifying the desired cache behavior.
A good overview of caching
https://medium.com/@codebyamir/a-web-developers-guide-to-browser-caching-cc41f3b73e7c
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
Caching is a technique that stores a copy of a given resource and serves it back when requested. When a web cache has a requested resource in its store, it intercepts the request and returns its copy instead of re-downloading from the originating server.
NOTE: See the discussion on "Freshness"
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching#Freshness
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
The Cache-Control general-header field is used to specify directives for caching mechanisms in both requests and responses. Caching directives are unidirectional, meaning that a given directive in a request is not implying that the same directive is to be given in the response.
A bit older article, but might be a good read too...
https://www.mnot.net/cache_docs/
some good technical articles - with good technical discussion
RFC-7234 Hypertext Transfer Protocol (HTTP/1.1): Caching
- https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching
- https://www.incapsula.com/cdn-guide/glossary/cache-control.html
- https://f5.com/resources/white-papers/caching-behavior-of-web-browsers
- https://www.keycdn.com/blog/http-cache-headers/
- https://stackoverflow.com/questions/49547/how-to-control-web-page-caching-across-all-browsers
https://tools.ietf.org/html/rfc7234
RFC-2616, Section 14 Header Field Defintiions
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Some additional articles to read/review:
- https://moz.com/blog/expires-headers-for-seo-why-you-should-think-twice-before-using-them
- https://medium.com/pixelpoint/best-practices-for-cache-control-settings-for-your-website-ff262b38c5a2
- https://stackoverflow.com/questions/2689236/how-does-browser-work-with-expiration-headers-cache-control-headers-last-modif
- http://www.mit.edu/~yandros/doc/cache_doc.html
- https://www.paladion.net/blogs/cache-control-directives-demystified
No comments:
Post a Comment