cache-control

Which browsers support stale-if-error and stale-while-revalidate?

≡放荡痞女 提交于 2021-02-05 12:11:32
问题 RFC 5861 proposes the Cache-Control extensions stale-while-revalidate: When present in an HTTP response, the stale-while-revalidate Cache- Control extension indicates that caches MAY serve the response in which it appears after it becomes stale, up to the indicated number of seconds. and stale-if-error: The stale-if-error Cache-Control extension indicates that when an error is encountered, a cached stale response MAY be used to satisfy the request, regardless of other freshness information.

Which browsers support stale-if-error and stale-while-revalidate?

牧云@^-^@ 提交于 2021-02-05 12:10:41
问题 RFC 5861 proposes the Cache-Control extensions stale-while-revalidate: When present in an HTTP response, the stale-while-revalidate Cache- Control extension indicates that caches MAY serve the response in which it appears after it becomes stale, up to the indicated number of seconds. and stale-if-error: The stale-if-error Cache-Control extension indicates that when an error is encountered, a cached stale response MAY be used to satisfy the request, regardless of other freshness information.

`cache-control: max-age=0` in http request

老子叫甜甜 提交于 2021-02-05 08:08:41
问题 I have one question: suppose in each http request there is a cache-control: max-age=0 header, so each request will go all the way to the origin web server. Does it mean CDN is not useful anymore if all requests are like this? 回答1: By setting the max-age to 0, you effectively expire your page in your CDN edge cache immediately. Therefore, your CDN always hit your origin and render the CDN useless as you suggested. Noticed from your other question that you are using Akamai. If so, then you can

`cache-control: max-age=0` in http request

跟風遠走 提交于 2021-02-05 08:06:26
问题 I have one question: suppose in each http request there is a cache-control: max-age=0 header, so each request will go all the way to the origin web server. Does it mean CDN is not useful anymore if all requests are like this? 回答1: By setting the max-age to 0, you effectively expire your page in your CDN edge cache immediately. Therefore, your CDN always hit your origin and render the CDN useless as you suggested. Noticed from your other question that you are using Akamai. If so, then you can

`cache-control: max-age=0` in http request

懵懂的女人 提交于 2021-02-05 08:04:40
问题 I have one question: suppose in each http request there is a cache-control: max-age=0 header, so each request will go all the way to the origin web server. Does it mean CDN is not useful anymore if all requests are like this? 回答1: By setting the max-age to 0, you effectively expire your page in your CDN edge cache immediately. Therefore, your CDN always hit your origin and render the CDN useless as you suggested. Noticed from your other question that you are using Akamai. If so, then you can

Why do I need to clean cache to see the up to date modules in my angular app?

↘锁芯ラ 提交于 2021-01-28 07:45:36
问题 We have an Angular 10 app that everytime we make a deployment to AWS, or even in DEV enviroment(over ngnix) we need to clean cache (CTRL+F5, doing this is solved). We have tried in the Angular project the next meta tags: <meta http-equiv="cache-control" content="no-cache, must-revalidate, post-check=0, precheck=0"> <meta http-equiv="expires" content="0"> <meta http-equiv="pragma" content="no-cache"> Another ideas we have tried is alternating hashing the file names by deployment. Once is done

If you are using Service Workers do you still need cache-control headers?

荒凉一梦 提交于 2021-01-02 19:29:23
问题 Is there any use-case where the use of cache-control headers should be preferred over Service Workers? Is there any benefit using both of them (apart from the fact the SW are not cross-browser supported) ? 回答1: Absolutely. HTTP cache, which is controlled by HTTP cache headers sits between the network and the service worker. All fetch requests initiated from the service worker still use HTTP cache. Let's say you have a script with long max-age . Most Service Workers repopulate their caches

If you are using Service Workers do you still need cache-control headers?

*爱你&永不变心* 提交于 2021-01-02 19:25:27
问题 Is there any use-case where the use of cache-control headers should be preferred over Service Workers? Is there any benefit using both of them (apart from the fact the SW are not cross-browser supported) ? 回答1: Absolutely. HTTP cache, which is controlled by HTTP cache headers sits between the network and the service worker. All fetch requests initiated from the service worker still use HTTP cache. Let's say you have a script with long max-age . Most Service Workers repopulate their caches

If you are using Service Workers do you still need cache-control headers?

人盡茶涼 提交于 2021-01-02 19:23:29
问题 Is there any use-case where the use of cache-control headers should be preferred over Service Workers? Is there any benefit using both of them (apart from the fact the SW are not cross-browser supported) ? 回答1: Absolutely. HTTP cache, which is controlled by HTTP cache headers sits between the network and the service worker. All fetch requests initiated from the service worker still use HTTP cache. Let's say you have a script with long max-age . Most Service Workers repopulate their caches

If you are using Service Workers do you still need cache-control headers?

白昼怎懂夜的黑 提交于 2021-01-02 19:23:13
问题 Is there any use-case where the use of cache-control headers should be preferred over Service Workers? Is there any benefit using both of them (apart from the fact the SW are not cross-browser supported) ? 回答1: Absolutely. HTTP cache, which is controlled by HTTP cache headers sits between the network and the service worker. All fetch requests initiated from the service worker still use HTTP cache. Let's say you have a script with long max-age . Most Service Workers repopulate their caches