Last active
April 4, 2024 22:05
-
-
Save lambdamusic/4734329 to your computer and use it in GitHub Desktop.
JavaScript: Forcee a page to reload #js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment