Skip to content

Instantly share code, notes, and snippets.

@spacejack
Last active March 15, 2020 04:01
Show Gist options
  • Save spacejack/6bfb766b8d227e4d840efb138ac3e1ea to your computer and use it in GitHub Desktop.
Save spacejack/6bfb766b8d227e4d840efb138ac3e1ea to your computer and use it in GitHub Desktop.
HTML tags for a simple web app (PWA)

Simple PWA HTML tags.

If you don't need the fancy features of a service worker and just want your SPA to behave nicely when a user adds to homescreen, or creates a desktop Chrome shortcut, these are the bare minimum HTML tags needed (not including the title, charset and other usual tags you would also have.)

Description and Image tags are useful for sharing purposes.

<meta name="viewport" content="initial-scale=1, width=device-width"/>
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="theme-color" content="#000000"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta property="og:title" content="MyApp"/>
<meta property="og:description" content="This is my app"/>
<meta property="og:image" content="img/hero.png"/>
<link rel="icon" sizes="192x192" href="img/icon.png"/>
<link rel="apple-touch-icon" sizes="192x192" href="img/icon.png"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment