← Works with

InstantPWA on Astro

Astro renders zero JavaScript by default, so the InstantPWA snippet is often the only client script on the page. Add it once to your base layout and every route becomes installable.

Install: Full support
Web push: Full support

Astro 2+ with any integration.

How to set it up

  1. 1

    Open src/layouts/BaseLayout.astro

    Or your equivalent shared layout file.

  2. 2

    Paste the snippet in <head>

    It doesn't need an island or hydration directive.

  3. 3

    Build and deploy

    Astro produces static HTML with the snippet baked in.

Want the full technical guide?

Manifest, service worker and code samples for Astro.

Setup guide

FAQ

Does it work with SSR mode?+

Yes — SSR only affects how HTML is generated; the client-side snippet behaviour is identical.

Ready to make Astro installable?

1,000 free impressions. No credit card.

Get started