Forcee a page to reload


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // This will forcefully reload the current page. No jQuery needed here.
  2.  
  3. location.reload(true);
  4.  
  5. // If your content might be cached by proxy servers and your URL has no query string, try this:
  6.  
  7. location.replace(
  8. location.href.replace(/\?.*$/, '') + '?' + Math.random());

URL: http://johannburkard.de/blog/programming/javascript/6-fast-jQuery-Tips-More-basic-Snippets.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.