0

I recently got some errors due to the browser reusing some cached js bundles.

Initially, the response serving the bundles did not have any Cache-Control headers. After the error, I added them but unfortunately, the issue persisted.

Question: Would adding the no-cache headers affect browsers that have already cached the js bundles? At what point does the cache validation happen? Is it that when the browser needs to make a request to given path:

  1. It will first check cache and then make request if cache-miss (hence no visibility on the newly added no-cache headers).
  2. Make request only for headers, make cache validation and then actual request if cache-miss (hence it has visibility on the newly added headers)

This is probably a very beginner question, but I couldn't get a clear answer from googling

Martin
  • 1,159
  • 10
  • 34
  • If the browser does not feel inclined in the first place, to check with the server again, whether the resource might have expired - then no, of course you can not do this. – CBroe Feb 23 '23 at 11:39
  • Right, so validation happens on the client side prior to making any requests. Feel free to put as an answer, thanks – Martin Feb 23 '23 at 11:44

0 Answers0