Chrome doesn't send “If-Modified-Since”

前端 未结 5 1186
终归单人心
终归单人心 2021-02-15 19:09

I want browsers to always add (except first time) \"If-Modified-Since\" request header to avoid unnecessary traffic.

Response headers are:

Accept-Ranges:         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-15 19:51

    1. Don't disable cache in Chrome Dev Tools (on "Network" tab).
    2. Cache-Control should be Cache-Control: public. Use true as second parameter to header PHP function: header("Cache-Control: public", true);

提交回复
热议问题