What is the risk of having HTTP header “Cache-Control: public”?

前端 未结 2 1060
不知归路
不知归路 2020-12-25 10:48

The Cache-Control HTTP/1.1 header can specify max-age as well as whether the cache content can be public or private, indicating whether intermediate cache can c

2条回答
  •  醉话见心
    2020-12-25 11:14

    The problem with Cache-Control: Public is that the response may be cached and displayed to a different user. This is a problem if you have an authenticated application that is displaying private data. In general, you should only use public for static pages, or pages that return the same data no matter what user is making the request.

提交回复
热议问题