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

前端 未结 5 2096
长发绾君心
长发绾君心 2021-02-15 19:35

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:54

    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);

提交回复
热议问题