Is Chrome ignoring Cache-Control: max-age?

前端 未结 8 1772
南旧
南旧 2020-11-27 02:56

Background:

  • IIS 7
  • AspNet 3.5 web app

Chrome dev tools lists 98 requests for the home page of the web app (aspx + js + css + images). I

8条回答
  •  执笔经年
    2020-11-27 03:32

    After doing some tests with Cache-Control:max-age=xxx:

    • Pressing reload button: header ignored
    • Entering same url any tab (current or not): honored
    • Using JS (window.location.reload()): ignored
    • Using Developer Tools (with Disable cache unselected) or incognito doesn't affect

    So, the best option while developing is put the cursor in the omnibox and press enter instead of refresh button.

    Note: a right button click on refresh icon will show refresh options (Normal, Hard, Empty Cache). Incredibly, no one of these affect on these headers.

提交回复
热议问题