Help centre
Answer
Can I add a service worker to a website builder?
Short answer
Only if the builder lets you serve a JavaScript service worker from the same origin as your site. A script from another domain can add a popup, but it cannot register an outside worker to control your pages. Without that file, offline caching and full PWA behaviour need a different hosting setup.
By InstantPWA engineering·Reviewed October 22, 2026
The same-origin rule
The service worker script must share the protocol, host and port of the page registering it. Its scope also limits which pages it can control.
Why script fields are not enough
A builder’s custom-code field adds code to the page. It does not create a root-level JavaScript file such as /sw.js on your domain.
Practical options
Use the builder’s built-in PWA feature if it has one, choose hosting that supports root files, or keep the goal to home-screen guidance and avoid promising offline access.
Setup guides for your website
Related
Is an install popup the same as a PWA?
No. An install popup is guidance that helps visitors add your website to their home screen. A full PWA uses a web app manifest and service worker so supported browsers can treat it as an installable app, with optional offline caching and push. A popup can be useful without promising every PWA feature.
Why is my Wix custom code not working?
Wix custom code commonly fails when it is tested in the editor, added through an HTML iframe, limited to the wrong page, or used before the site is published on a connected domain. Add it in Settings → Custom Code, choose All pages, load it once, place it at Body-end and test the live domain.
Why is my Framer custom code not working?
Framer custom code may not run when your plan lacks Custom Code access, the code is on one page only, the project has not been published, or you are checking a different domain. Add it in Site Settings → General → Custom Code, choose the end of body, publish, and test the live address.
What is a PWA?
A PWA (Progressive Web App) is a regular website that meets three technical criteria — HTTPS, a Web App Manifest and a service worker — so browsers let visitors install it on their home screen. Once installed, it launches like a native app, works offline and can send push notifications.
Can a PWA send push notifications on iOS?
Yes. Since iOS 16.4 (March 2023), a PWA can send Web Push notifications on iPhone and iPad — but only after the user installs it to the home screen. Push in a regular Safari tab is not supported, and the user must explicitly grant notification permission from inside the installed PWA.
Do PWAs work offline?
PWAs can work offline, but only for content their service worker has explicitly cached. Registering a service worker does not automatically make a site offline-capable — you decide what to cache (app shell, API responses, images) and what strategy to use (cache-first, network-first, stale-while-revalidate).