HTTP Cache Control max-age, must-revalidate

后端 未结 3 715
青春惊慌失措
青春惊慌失措 2020-11-29 21:16

I have a couple of queries related to Cache-Control.

If I specify Cache-Control max-age=3600, must-revalidate for a static html/js/images/css file, wit

3条回答
  •  囚心锁ツ
    2020-11-29 21:51

    The given answers are incorrect, at least for web browsers in 2019.

    "After expiration the browser will check at the server if the file is updated" <- not true

    I have a static file served with "Cache-Control: public,must-revalidate,max-age=864000" and both Chrome and Firefox do a request every time (and get a 304 Not Modified back every time).

提交回复
热议问题