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

后端 未结 2 1704
灰色年华
灰色年华 2021-01-27 02:08

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

2条回答
  •  孤城傲影
    2021-01-27 02:49

    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.

提交回复
热议问题