I'm working on developing a feature called "version updated" component that displays a banner notifying users when the website has been updated and prompts them to reload. The challenge I'm facing is that some users are experiencing issues with cached pages not updating properly even after reloading. In the past, we have instructed users to press CTRL+F5 but I am exploring options for automating this process.
Currently, I'm implementing the following code:
this.$window.location.reload(true);
The function signature for this code is defined as follows:
reload(forcedReload?: boolean): void;
My question is, does using this code ensure that the page will bypass the cache? When testing it by manually pressing CTRL+F5, the Network tab in Chrome shows a 200 status code for index.html, whereas using $window.location.reload(true)
results in a 304 [Not Modified] status.