navigator.serviceWorker
Background scripts that outlive the page and can answer requests when you return. What a site can leave behind, and why it needs a secure origin.
Checking the browser you are reading this in…
Entry in question 3: What it can keep on your computer
What it is
A service worker is a script a site registers once and that then persists — separate from any tab, able to intercept the site's own network requests, serve cached responses, and wake up for background events. It is the mechanism behind offline-capable websites.
What a site can do with it
It is the most durable thing on this list. A registered worker survives closing the tab and can run before your next request to that site reaches the network. That is exactly why it is only available on secure origins, and why clearing site data has to remove workers along with cookies.
Check it yourself
Open your browser's developer tools, go to the console, and paste this. Nothing is sent anywhere; the answer comes from the browser you are reading this in.
!!navigator.serviceWorker The full path recorded by the walk is navigator.serviceWorker, and that is the string the leaflet prints beside this entry.
What the answer is on an ordinary browser
Written by hand for each of the three engines, because a table generated from one sentence would be worth nothing to the person reading it.
- Chrome
- Present on secure origins, and deliberately absent in private windows in some configurations.
- Firefox
- Present on secure origins; withheld in private browsing windows.
- Safari
- Present on secure origins.
If your browser is not present, the leaflet prints this instead of dimming the line: Not present. This page is either not on a secure origin or the browser is in a mode that withholds it.
Where it sits in the leaflet
This is one of 6 entries in question 3, what it can keep on your computer. The leaflet reads all 42 entries in one press and prints each answer beside the question, with the property name next to it so you can check any line.
Read my browser · navigator.webkitPersistentStorage · navigator.locks