Is there a way to construct a link to a URL that forces the browser to ignore any cache it might have for that URL?
We have some websites that have recently changed after literally years of static content. Users click shortcuts, favorites, or type URL's to these sites and get old, cached content. I would like to have a page with a link that goes to the same URL but forces the browser to get the fresh content.
is that possible? Cross-browser?
The trick to reloading the page is to force the browser to not look into the cache, but rather to again make a connection to the Web and bring up the document from the server. Most people know it can be done by hand by holding the shift key and clicking the “Refresh” (on IE) or “Reload” (on Navigator) buttons.
Force-refresh your web page.Windows — Press Ctrl + F5 . If that doesn't work, hold down Ctrl and click the "Refresh" icon. Mac — Press ⌘ Command + ⇧ Shift + R . In Safari, you can also hold ⇧ Shift and click the "Refresh" icon.
After you set the specified URL into location, issue window. location. reload(true) . This will force browser to reload the page.
If you put # inside the href like <a href="#"></a> then the link will not refresh or reload when clicked.
You can do it in a systematic way using dates or timestamps or version numbers, or haphazardly using sitcoms, muppets, mountain ranges, and small mammals.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With