Skip to content
B

Basic Service Worker

A basic Service Worker to make your web app work offline

by pwa-todayFree

#4737in Utilities
0In stores

Description

Basic Service Worker is a small service worker script from pwa-today that helps a web app work offline. It caches static assets and the resp…

Highlights

  • Caches static assets and routes
  • Queues POST, PUT and DELETE requests offline
  • Retries queued requests when online
  • Registration script with background updates
  • Notes on iOS behavior

Ratings & Reviews

No ratings yet

Be the first to rate Basic Service Worker.

People also visit

U

UpUp

Easily create sites that work offline as well as online

Utilities
Launch
P

pwa-development

Progressive Web Apps - service workers, caching strategies, offline, Workbox

AI Skills
Get
S

Serwist

A Swiss Army knife for service workers

Utilities
Launch
K

Kinto.js

An Offline-First JavaScript Client for Kinto

Utilities
Launch
A

Astro

Zero-config PWA Integration for Astro

Utilities
Launch
P

Pwastats

A directory of Progressive Web App case studies

Utilities
Launch

Basic Service Worker FAQ

What is it?

A basic service worker script for making a web app work offline.

How do I install it?

Put service-worker.js and sw-registration.js in your web app's root folder, then include sw-registration.js in the footer of each page.

What happens to requests made offline?

POST, PUT and DELETE requests are stored in IndexedDB and retried when the app is back online.

How are updates handled?

New versions install in the background and activate when the app is closed and reopened, or when the user navigates to another page.

What are the best Basic Service Worker alternatives?

Popular alternatives to Basic Service Worker include UpUp, Serwist and Kinto.js. See all Basic Service Worker alternatives

Developer Stuff

Badges