I am using the following code to refresh my page using a link:
<a href="javascript:history.go(0)">
This works in Safari (i.e. the page is refreshed to the new content). In Firefox however I am getting the cached page. Is there a way of adapting this to work in all browsers, or do I need a different method?
Thanks,
Nick
You can use:
<a href='#' onclick='location.reload(true); return false;'>click me</a>
You can just leave the href as empty and it will reload the current page.
<a href=''>Reload</a>
No need for onclick event or #.
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