Skip to content

Instantly share code, notes, and snippets.

@andrew-bazhanov
Forked from KonstantinBozhkov/include-sw.js
Created February 26, 2021 11:19
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 andrew-bazhanov/5dae992c1b1eeb727800a27419100ce2 to your computer and use it in GitHub Desktop.
Save andrew-bazhanov/5dae992c1b1eeb727800a27419100ce2 to your computer and use it in GitHub Desktop.
Include SW
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./sw.js') // Path to sw file
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment