1

I'm working on a web app and I'm having the following problem:

  • When I go on some page my server sends a response with cache-control: no-cache header.
  • Then I do some changes (graphql mutations) on that page.
  • When I go to an other page and then click browser back then my browser reads the outdated "response" from the disk cache instead of sending a request to the server to get the change data.

browser loads response from cache although no-cache header is set

I wondering if there is something missing in my headers telling the browser to not use the disk cache?

Some info: The browser does not send a request to my server. (So it is not cached somewhere else.) It is not the back-forward cache. (There is already some logic handling the bfcache.) I can reproduce it in all my browsers. (e.g. Firefox, Chrome, ...) When I disable the disk cache in the Firefox settings then it is working correctly. (Now, the bfcache kicks in.)

I also found the following thread. Is there a better solution? Chrome is caching even with HTTP no-cache headers

Aquila132
  • 11
  • 1

0 Answers0