4 ms·
When you click refresh, your browser will revalidate those 100yr lifespan resources. If they are immutable, it won't revalidate.
by discreditable 10y ago
When you click refresh, your browser will revalidate those 100yr lifespan resources. If they are immutable, it won't revalidate.
- whack 10y agoAccording to this link, the browser won't perform any revalidation for the duration of the max-age? https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#max-age https://developers.google.com/web/fundamentals/performance/o... However, what if you want to update or invalidate a cached response? For example, suppose you've told your visitors to cache a CSS stylesheet for up to 24 hours (max-age=86400), but your designer has just committed an update that you'd like to make available to all users. How do you notify all the visitors who have what is now a "stale" cached copy of your CSS to update their caches? You can't, at least not without changing the URL of the resource. After the browser caches the response, the cached version is used until it's no longer fresh, as determined by max-age or expires, or until it is evicted from cache for some other reason— for example, the user clearing their browser cache. As a result, different users might end up using different versions of the file when the page is constructed: users who just fetched the resource use the new version, while users who cached an earlier (but still valid) copy use an older version of its response.
- tempestn 10y agoThat's all true, but it applies to regular page loads, not the case where the user explicitly presses the reload button.
- fastest963 10y agoIt shouldn't revalidate unless there are other headers that might cause it to revalidate (If-Modified-Since?).