[KongchangAI]
Concept

Service Worker

A Service Worker is a script that runs in the browser background independently of the main web page thread, forming part of the Web API. It acts as a proxy layer between the browser and the network, intercepting and handling network requests and managing cached resources to enable offline access, page performance optimization, push notifications, and background data synchronization. Service Workers operate on an event-driven model, require an HTTPS environment, and are a core technology for building Progressive Web Apps (PWAs).

Core Facts

Timeline (last 90 days)

Nov 17

The /app/<session>/ prefix is used for multi-tab isolation: the Service Worker is shared across all tabs, and the parent page generates a random session ID for each tab to route requests to the Datasette instance in that session's dedicated Web Worker.

Unverified50%
Nov 17

The new version of Datasette Lite registers a Service Worker that acts on the entire lite.datasette.io domain, intercepting HTTP requests and having client-side code respond; the parent page creates an iframe and makes requests to standard Datasette URLs with an /app/<session>/ prefix.

Unverified50%
Nov 17

Simon Willison released a complete Service Worker–based rewrite of Datasette Lite, which the author says is almost indistinguishable from a real server-side application.

Unverified50%
Oct 28

The technical foundations involved in local caching and preloading include local databases (such as SQLite, IndexedDB) and offline-first web technologies such as Service Worker.

Unverified50%
Oct 20

Manifest V3 service workers can be put to sleep by the browser at any time, so features involving long connections or scheduled synchronization require additional design.

Unverified50%
Oct 17

A Service Worker is a script running in the background that can intercept network requests and cache resources, thereby enabling offline access and fast loading; its lifecycle includes events such as install, activate, and fetch.

Unverified50%
Oct 17

Data in localStorage and IndexedDB is bound to a specific domain and browser instance, and clearing browser data or changing browsers or devices will make the data inaccessible; they do not participate in the Service Worker caching mechanism and cannot automatically sync to the server.

Unverified50%
Oct 17

Service Worker requires the page to run over HTTPS or localhost, and it is fully asynchronous and cannot directly access the DOM.

Unverified50%
Oct 17

Through the Web App Manifest and Service Worker, the app can be "installed" to the Android or iOS home screen, running in a standalone window with the browser address bar hidden, delivering an experience close to a native app.

Unverified50%
Oct 17

After the Service Worker caches static resources, the app can be used fully offline, but the core data of the bookkeeping app is in localStorage, the Service Worker does not cache the data itself, and because there is no server, transactions entered offline will not automatically sync after the network is restored.

Unverified50%

9 more timeline events

All Facts (20)

Verified

PWA is a form of web application that Google heavily promoted around 2015, relying on three key technologies: Service Worker, Web App Manifest, and HTTPS.

80%
Verified

Manifest V3 replaces the previously long-running Background Page with a Service Worker

80%
Verified

A Service Worker is essentially a script thread running independently in the browser background, acting as a proxy layer between the web application and the network and capable of intercepting network requests.

75%
Verified

The three core technical components of a PWA are Service Worker, Web App Manifest, and mandatory HTTPS connections.

70%
Unverified

Service Worker需要HTTPS环境才能注册,且不支持IE浏览器

95%
Unverified

Service Worker是运行在浏览器主线程之外的独立JavaScript工作线程,具有安装、激活和运行三个生命周期阶段

95%
Unverified

Chrome的Service Worker在空闲约30秒后会被浏览器主动终止以节省内存和CPU资源

80%
Unverified

Offline availability is typically implemented using PWA technology, where a Service Worker caches key resources locally during the first visit so that subsequent visits can load from the cache bypassing the network.

60%
Unverified

PWAs implement offline caching and background sync via Service Workers, and push notifications via the Web Push API.

60%
Unverified

Apple did not support Service Workers in Safari until 2018, and only conditionally supported Web Push notifications starting with iOS 16.4.

60%
Unverified

The new version of Datasette Lite registers a Service Worker that acts on the entire lite.datasette.io domain, intercepting HTTP requests and having client-side code respond; the parent page creates an iframe and makes requests to standard Datasette URLs with an /app/<session>/ prefix.

50%
Unverified

The /app/<session>/ prefix is used for multi-tab isolation: the Service Worker is shared across all tabs, and the parent page generates a random session ID for each tab to route requests to the Datasette instance in that session's dedicated Web Worker.

50%
Unverified

The technical foundations involved in local caching and preloading include local databases (such as SQLite, IndexedDB) and offline-first web technologies such as Service Worker.

50%
Unverified

Manifest V3 service workers can be put to sleep by the browser at any time, so features involving long connections or scheduled synchronization require additional design.

50%
Unverified

Through the Web App Manifest and Service Worker, the app can be "installed" to the Android or iOS home screen, running in a standalone window with the browser address bar hidden, delivering an experience close to a native app.

50%
Unverified

After the Service Worker caches static resources, the app can be used fully offline, but the core data of the bookkeeping app is in localStorage, the Service Worker does not cache the data itself, and because there is no server, transactions entered offline will not automatically sync after the network is restored.

50%
Unverified

Service Worker requires the page to run over HTTPS or localhost, and it is fully asynchronous and cannot directly access the DOM.

50%
Unverified

Data in localStorage and IndexedDB is bound to a specific domain and browser instance, and clearing browser data or changing browsers or devices will make the data inaccessible; they do not participate in the Service Worker caching mechanism and cannot automatically sync to the server.

50%
Unverified

A Service Worker is a script running in the background that can intercept network requests and cache resources, thereby enabling offline access and fast loading; its lifecycle includes events such as install, activate, and fetch.

50%
Unverified

PWA (Progressive Web App) can approach a native experience with the help of modern browser capabilities, supports adding to the home screen and offline use, and is completely free from app store review constraints.

50%

Source Articles