Posted By

magicrebirth on 10/21/10


Tagged

js location math random reload


Versions (?)

Forcee a page to reload


 / Published in: JavaScript
 

URL: http://johannburkard.de/blog/programming/javascript/6-fast-jQuery-Tips-More-basic-Snippets.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());

Report this snippet  

You need to login to post a comment.