Setting no-cache after a cache has occurred?

22 views Asked by At

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

0

There are 0 answers