
A progressive web app (PWA) is an ordinary website that behaves like an app: people can install it, launch it from the home screen or desktop in its own window, and keep using it when the connection drops. You write it once with HTML, CSS and JavaScript, and it works on phones and computers without an app store. If you can already build a simple website, you can turn it into a PWA in an afternoon.
Steve Jobs suggested web apps for the first iPhone in 2007, but browsers of the time could not work offline or be installed. The term "progressive web app" was coined in 2015 by Google engineer Alex Russell and designer Frances Berriman. The word "progressive" means the site works for everyone and gets better where the browser supports more features. Service workers arrived in Chrome and Firefox in 2015 and 2016, and Safari added them in 2018.
Create a file called manifest.webmanifest in the root of your site and link it from every page with <link rel="manifest" href="/manifest.webmanifest">. A minimal manifest contains these members:
Adding an id member gives the app a stable identity even if you later change start_url.
Create sw.js in the root folder. Its location matters: a service worker controls only pages inside its folder, so a file in /js/ could not control your home page. In your main script, register it after checking for support:
if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js'); }
The service worker has a life cycle. In the install event you download and store the files the app needs, the "app shell": the HTML, CSS, JavaScript, icons and an offline page. In the activate event you delete old caches. In the fetch event you decide how to answer each request, from the cache or from the network.
Writing these rules by hand is instructive, but many projects use Workbox, a Google library that generates a service worker with ready-made strategies and precaching.
Installation differs by platform:
Because support varies, show iOS users a short hint instead of waiting for a prompt.
Open Chrome DevTools and go to the Application panel. The Manifest section shows errors and your icons; the Service workers section lets you update, unregister or simulate offline mode. Lighthouse no longer has a separate PWA score, so rely on these checks and on real devices. When everything works, publish the site; many free hosting services provide HTTPS automatically.
Next, explore push notifications, background sync and app shortcuts in the manifest. Keep the core simple: a fast, reliable website is the foundation, and PWA features are layers on top.
Grade 10 Math: Functions and Reasoning - Quiz
1170 questions