lambdamusic
2/7/2013 - 9:25 PM

JavaScript: Forcee a page to reload

JavaScript: Forcee a page to reload

// This will forcefully reload the current page. No jQuery needed here.

location.reload(true);

// If your content might be cached by proxy servers and your URL has no query string, try this:

location.replace(
 location.href.replace(/\?.*$/, '') + '?' + Math.random());