How to prevent request that returns 304

前端 未结 4 764
栀梦
栀梦 2020-11-30 23:59

When does a browser NOT make a request to the server for a file?

In other words, I have a JavaScript file being served. Its HTTP response header has an ETag

4条回答
  •  无人及你
    2020-12-01 00:43

    Expires: or Cache-Control: max-age= should work. Have you confirmed in the server logs that the browser is actually making network calls? I've found that firebug, for example, has confusing output that suggests you are making remote calls when you are actually hitting the cache.

提交回复
热议问题