Refresh the page by clicking on the link
I have the following to refresh my page when I click on href.
<a href="javascript:history.go(0)">Click to refresh the page</a> I have it
<meta http-equiv="no-cache"> in the title tag. Even then I get a cached copy. How can I avoid downloading a cached copy?
instead
javascript:history.go(0); you can use
javascript:window.location.reload(); The <meta> missing a content attribute. try it
<meta http-equiv="expires" content="0" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="expires" content="-1" /> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> You can also try
<a href="javascript:window.location.reload();"> but I'm not sure how this works with caching
<a onclick="window.location.href=this">test</a> Try the following:
<a class="refresh_link" href="javascript:void(0)">click to Refresh the Page</a> <script type="text/javascript"> $(document).ready(function(){ $(".refresh_link").click(function(){ location.reload(); }); }); </script> Used by jquery
try it
window.location.href=window.location.href