Warm tip: This article is reproduced from stackoverflow.com, please click
cache-control http

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

发布于 2020-05-14 09:51:14

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?

Questioner
Robbie
Viewed
57
Jason W 2015-03-16 11:18

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 use the Edge-Control header to override your cache-control if you don't have direct control over that value, but still want to be able to leverage CDN functionality.