How to totally prevent HTTP 304 responses in Connect/Express static middleware?

前端 未结 4 952
说谎
说谎 2021-02-07 11:05

At times during development, it would be really nice to prevent HTTP 304 responses (in favor of 200\'s), and cause the Connect/Express static middleware to read every r

4条回答
  •  生来不讨喜
    2021-02-07 11:51

    it does read from the file system on every response. it's just that if the request ETAG matches the response ETAG, it doesn't send the body of the response because it doesn't have to . It's the same file with the same hash. this is how 304 responses work.

    why do you want to prevent 304 responses?

提交回复
热议问题