Created
May 15, 2019 17:38
-
-
Save alex-titarenko/9546d7b3d4b2d4d9b72578dcb9876707 to your computer and use it in GitHub Desktop.
PWA Blog Post - Code snippets (index.html)
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="theme-color" content="#ffffff"> | |
<link rel="manifest" href="/manifest.json"> | |
<title>First PWA</title> | |
</head> | |
<body> | |
<h1>Hello PWA!</h1> | |
<script> | |
if('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('/serviceworker.js'); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment