Created
May 10, 2019 14:31
-
-
Save ichtrojan/6b00068613df58c445876d2998f95609 to your computer and use it in GitHub Desktop.
Reload a Page after first load
This file contains hidden or 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
(() => { | |
if( window.localStorage ) | |
{ | |
if(!localStorage.getItem('firstLoad')) | |
{ | |
localStorage['firstLoad'] = true; | |
window.location.reload(); | |
} else { | |
localStorage.removeItem('firstLoad'); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment