Skip to content

Instantly share code, notes, and snippets.

@holtwick
Created November 1, 2021 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holtwick/717ed5edd1f06b819495bb12627c1bc6 to your computer and use it in GitHub Desktop.
Save holtwick/717ed5edd1f06b819495bb12627c1bc6 to your computer and use it in GitHub Desktop.
Force PWA Reload on iOS
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