Created
November 1, 2021 22:01
-
-
Save holtwick/717ed5edd1f06b819495bb12627c1bc6 to your computer and use it in GitHub Desktop.
Force PWA Reload on iOS
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 ('serviceWorker' in navigator) { | |
navigator.serviceWorker.getRegistrations().then(function(registrations) { | |
registrations.map(r => { | |
r.unregister() | |
}) | |
}) | |
window.location.reload(true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment