We have a web application with an integrated function to clear end user browser caches (useful when we need to enforce updates), it uses the Clear-Site-Data: "cache"
header and triggers a reload of the page.
It looks all good, e.g. Chrome confirms:
Clear-Site-Data header on 'https://example.com/clear': Cleared data types: "cookies", "storage", "cache", "clientHints". Clearing channel IDs and HTTP authentication cache is currently not supported, as it breaks active network connections.
Then, the site is reloaded, but we can see from the browser network tab that many files (css files in our particular case) still originate from cache in an old version.
Once I close the tab and re-open it, these files are fresh and not from cache. Is this intended behaviour? Do we need to add/enforce tab closing in some way..?
PS: Firefox currently doesn’t support Clear-Site-Data: "cache"
, but it behaves in the same way with Clear-Site-Data: "*"
.
Thanks for any ideas and information about this!