Service Workers And The Cache That Outlives Your Session
What a service worker actually is
A service worker is a JavaScript file the browser installs and runs on its own, separate from any page and separate from any tab. Once a site registers one with navigator.serviceWorker.register(), the browser hands it a scope (usually an origin, sometimes a subpath) and starts routing that origin’s network activity through it. The worker sits between the page and the network. It can intercept every fetch, decide whether to serve something from local storage or go out to the internet, and rewrite the response before the page ever sees it.
The part that matters for this article is what happens after you close the tab. A normal page’s JavaScript dies the moment you navigate away. A service worker keeps running in a background thread that the browser can spin up and tear down as needed, independent of whether the page that registered it is open, independent of whether you’ve closed the window, and in some cases independent of whether the browser process itself is still running in the foreground. A newly registered worker moves through install, then waiting, then activate before it’s allowed to control a page, and once active it drops to idle, where the browser can discard it from memory and reload the script only when the next event needs handling. The browser will wake a dormant service worker to handle a push notification, a background sync event, or just the next time you load a page in its scope.
That’s a genuinely useful piece of engineering. It’s also the reason “session” is the wrong mental model for anything a service worker touches. A cookie belongs to a session in a meaningful sense: it has an expiry, it gets attached to requests, and clearing it ends the relationship. A service worker is scoped to an origin, not a session, and it persists until something explicitly unregisters it, the browser evicts its storage under pressure, or you clear site data for that origin specifically. Understanding that distinction is the whole article in one paragraph: everything downstream of it, the caching, the push subscriptions, the background sync, the storage quota leakage, all comes from the same basic fact that this code doesn’t respect the boundary you think it does.
Why browsers gave pages this much power
None of this exists because someone wanted a tracking primitive. Service workers were built to make the web behave more like native apps. A news site can precache its shell and recent articles so a repeat visit loads instantly even on a flaky connection. A messaging app can queue an outgoing message with Background Sync so it actually sends once your phone finds signal again, instead of silently failing because you happened to lose connectivity mid-send. A retailer can push “your cart item just went on sale” notifications without you having the tab open. Google pushed hard on all of this through the Progressive Web App push and the Workbox library, and it worked: service workers are table stakes now for any site that wants app-like reliability.
The capability itself is neutral. What changed is that the same properties that make offline mode useful, namely a background process with persistent storage that survives tab closure and browser restart, are exactly the properties a tracker wants when cookies stop being reliable. Nobody designed the Cache Storage API to be a covert identifier store. It just happens to be a durable, per-origin key/value store that most people weren’t watching as closely as they were watching cookies, because for the first decade of its existence almost nobody used it for anything other than offline assets.
That’s the pattern worth remembering through the rest of this piece: every mechanism described below is a legitimate feature being read for a purpose its designers didn’t intend, not a secret backdoor. The distinction matters because it means there’s no single patch that fixes it. The feature has to keep working for the sites that use it honestly, which means the burden of checking what’s actually stored under a given origin falls on whoever is managing the profile.
The cache that survives when the cookie is gone
It helps to be precise about what “cache” means here, because the term gets used loosely. The regular HTTP cache, the one governed by Cache-Control headers, is not what this article is about. That cache is a courtesy the browser extends to speed up repeat requests, and it respects expiry the way you’d expect.
The Cache Storage API is different. It’s a store of Request/Response object pairs that a service worker (or, less commonly, a page directly) writes to and reads from under explicit code control, through caches.open() and the methods on the resulting object. There’s no Expires header governing it. An entry sits there until the code that manages it deletes it, until the browser’s storage eviction kicks in under disk pressure, or until the user clears site data for that origin. It lives on disk, inside the browser profile’s storage partition, right alongside IndexedDB and the service worker registration itself.
Here’s the part that gives this article its title. A session cookie can expire the moment you close the browser. A login cookie can get deleted the moment you log out or clear cookies through a lightweight tool. None of that touches Cache Storage, IndexedDB, or the service worker registration for that origin. The next time the same browser profile visits the same site, the old service worker wakes up, resumes control of the page, and can read back anything it wrote the first time it saw you, including a randomly generated identifier it planted in IndexedDB specifically so it would have something to read back. Your session ended. The cache didn’t notice.
How platforms turned an offline feature into a tracking device
The mechanism is unglamorous once you see it. On a visitor’s first load, a site’s service worker (or the page script that registers it) writes a random UUID into IndexedDB or into a Cache Storage entry. On every subsequent load, before anything else happens, the worker reads that value back and attaches it to outgoing requests, either as a custom header or folded into a request body. No cookie is involved anywhere in that flow. If the site’s backend correlates that UUID against account activity, purchase history, or login attempts, it has built a persistent visitor identifier that lives entirely outside the storage surface most privacy tooling was built to police.
This is what “service worker tracking” actually refers to in practice, and it’s worth being exact about it because the phrase gets thrown around loosely. The service worker itself isn’t doing anything sinister by existing. What’s being exploited is the storage substrate underneath it, Cache Storage and IndexedDB specifically, being used to hold an identifier that survives the cleanup routines most people and most tools actually run.
Part of why this became attractive to sites is the direction cookies have been pushed. Third-party cookie phase-outs, Safari’s Intelligent Tracking Prevention, and years of ad blockers and privacy extensions specifically targeting cookies all made the cookie jar an increasingly audited, increasingly hostile place to store a durable identifier. Sites that wanted continuity anyway looked for less-watched corners of the storage API surface. Service worker storage was a natural candidate: it ships by default with any site using offline caching, it requires no consent prompt the way geolocation or notifications do, and for years almost no browser extension or anti-detect tool treated it as a first-class thing to isolate or clear.
Push subscriptions: an ID you didn’t clear
Push notifications add a second, more concrete identifier on top of whatever gets written to Cache Storage. When a page calls PushManager.subscribe() from within its service worker’s scope, the browser generates a subscription object containing an endpoint URL and a set of keys. That endpoint is issued by the browser vendor’s push relay (Firebase Cloud Messaging for Chrome, Mozilla’s push service for Firefox, and so on) and it’s unique to that specific subscription. The site’s backend stores it so it can send messages later, which means it’s also, functionally, a stable identifier the backend can use to recognize the device that subscribed. The subscription object itself carries two keys alongside the endpoint, a p256dh public key and an auth secret, so the backend can encrypt push payloads that the relay itself can’t read. Neither key is meant to change without a fresh subscribe() call, which is exactly why both carry over intact whenever the underlying registration does.
That subscription persists independent of cookies. It survives until the code explicitly calls unsubscribe(), or until the service worker registration itself is torn down and the browser garbage collects it. Nothing about clearing cookies, logging out, or even resetting a browser fingerprint touches it.
The failure mode worth naming here is specific: if any workflow duplicates a browser profile as a shortcut, whether that’s a template feature in a piece of multi-accounting software or just a manual copy of a user-data directory to save setup time, and that source profile had an active push subscription for a given origin, the new profile inherits it. Unless the site’s registration code explicitly re-subscribes (and most implementations don’t bother, since the whole point of a subscription is that it’s meant to be stable), the “new” profile shows up carrying the exact same push endpoint as the old one. From the platform’s side, that’s not a probabilistic fingerprint match. It’s the same literal credential appearing under two supposedly separate identities, which is a far stronger signal than almost anything derived from canvas or WebGL.
Background sync: your browser working while you’re not looking
Background Sync and its less-supported sibling, Periodic Background Sync, let a registered service worker ask the browser to wake it up later to retry a task, even after the tab and sometimes the entire browser window that triggered it has closed. The legitimate use case is exactly what it sounds like: a chat app queues a message that failed to send, registers a sync event, and the service worker retries it automatically once the browser detects a network connection again, all without the user having to reopen the app.
The tracking-adjacent use is the same mechanism aimed at telemetry instead of message delivery. A service worker with a registered sync or periodic sync task can ping an analytics endpoint on a schedule that has nothing to do with whether the user considers themselves “on” the site. Activity data keeps flowing from a device the user believes they’ve left behind.
It’s worth being honest about the limits here rather than overselling it. Background Sync isn’t an unlimited background process. Chromium gates it behind engagement heuristics (a site with very low engagement gets throttled or denied), mobile operating systems are aggressive about killing background work to save battery, and Periodic Background Sync in particular has much narrower browser support and stricter installability requirements (it generally requires the site to be installed as a PWA) than plain Background Sync. So this isn’t a channel that runs forever on every visit to every site. But it is a real, underused persistence angle, and it’s one that most people auditing a browser profile for tracking surfaces don’t think to check, because it doesn’t show up as an obvious entry the way a cookie or a localStorage key does.
Storage quota: the fingerprint hiding in a permissions prompt
navigator.storage.estimate() is an API most developers call for entirely benign reasons: checking whether there’s enough room left to cache another chunk of offline content before writing it. It returns an object with a usage figure and a quota figure, and neither of those numbers requires a permissions prompt or any user awareness at all.
The quota figure is where this gets interesting. Browsers derive it from the actual free disk space on the device, historically allocating some fraction of it to a given origin’s storage budget. Sites can also call navigator.storage.persist() to ask the browser not to evict their data under pressure at all, and when eviction does happen it tends to work least-recently-used across origins, so a site visited regularly is the last one purged. That means the raw quota number describes the physical machine underneath the profile, not the profile itself. Two browser profiles running on the same host, whether that’s two anti-detect profiles on one laptop or forty profiles on one server, are reading from the same disk and will tend to report similar quota values, because there’s only one real amount of free space to measure.
For an operator running multiple profiles on shared infrastructure, that’s a correlation signal that has nothing to do with how carefully the fingerprint has been randomized elsewhere. User agent, canvas, WebGL, fonts, all of those can be spoofed by the browser layer sitting on top of the storage subsystem. Disk space generally isn’t, because spoofing it convincingly would mean the browser lying to itself about how much room it actually has to write cache data into, with real consequences if it gets it wrong. If a platform logs storage quota as one more field in a broader fingerprint, profiles that share a host can end up clustering together in a way that no amount of canvas noise fixes, simply because the underlying hardware is the same hardware.
A worked example: two “different” profiles, one giveaway
Walk through a concrete, plausible sequence to see how these pieces combine. An operator sets up a profile in an anti-detect browser and uses it to browse a target site for a while. In the course of that, the site’s service worker writes a device identifier to IndexedDB and registers a push subscription, both entirely normal behavior for that site’s offline and notification features.
Later, to save setup time, the operator duplicates that profile as a starting template for a second one, changing the obvious fingerprint surfaces: canvas noise, user agent, timezone, screen resolution, maybe the proxy. What doesn’t get touched is Application storage, because most fingerprint-swap workflows don’t treat it as a fingerprint field in the conventional sense.
The second profile visits the same site. The service worker registration for that origin was part of what got cloned, so it reactivates immediately, on the very first load, with no re-registration delay a fresh profile would normally show. It reads the same IndexedDB identifier the first profile wrote. If the subscription code path doesn’t force a fresh subscribe() call, which most implementations have no reason to, the push endpoint carries over too.
From the site’s side, two visits that presented completely different canvas hashes, user agents, and IP addresses just handed over an identical stored device ID and an identical push subscription. Nothing about that requires clever detection logic. It requires the site to read back a value it wrote itself the first time, which is precisely what the feature is for. The leak is a template that got cloned without clearing the one storage bucket nobody thought to check, not a fingerprinting breakthrough.
Why clearing cookies doesn’t kill any of this
A lot of workflows, both manual and automated, treat “clear cookies” as equivalent to “reset the browser’s memory of me.” That was roughly true in an era when cookies were the only durable client-side storage a site had. It stopped being true once IndexedDB, Cache Storage, and Service Worker registrations became standard.
In Chromium’s storage architecture, these live in genuinely separate buckets inside the profile directory: cookies in their own store, IndexedDB in its own folder, Service Worker registrations and Cache Storage entries in theirs. On disk, those buckets are literally named that way: Service Worker, IndexedDB, and Cache Storage sit as folders next to the cookie database file, not inside it. A tool or extension built specifically to manage cookies, whether that’s a browser’s own cookie manager or a lightweight cookie-editor extension, touches exactly the bucket it was built for and nothing else. Chrome’s full “Clear browsing data” dialog, when you check “Cookies and other site data” rather than just cookies specifically, does sweep all of these together. But plenty of automation scripts, and plenty of workflows built around speed, reach for the narrower cookie-only clear because that’s the surface that mattered when the script was first written, or because it’s the fast path and nobody revisited the assumption.
That mismatch, between what actually holds a persistent identifier and what a given clearing step actually touches, is where continuity leaks through in practice. It’s rarely a sophisticated detection technique catching someone out. It’s a workflow that cleared the thing it knew to clear and left the rest exactly where it was.
What incognito and ephemeral profiles actually change
Modern Chromium does permit service workers inside Incognito windows, which wasn’t always true, but it handles their storage differently than a regular profile does. An incognito session gets its own ephemeral storage partition, and when the last incognito window for that session closes, that partition, service worker registration included, gets torn down along with it. For the specific problem in this article, a genuinely fresh incognito window is closer to an actual per-session container than a regular saved profile is, because there’s nothing left to read back on the next launch.
The caveat is that “incognito-like” behavior in a given anti-detect browser’s temporary or disposable profile mode isn’t guaranteed to work the same way just because it’s described in similar terms. Some tools implement a genuinely ephemeral profile that’s wiped on close. Others implement something closer to a template that gets reset to a saved baseline state rather than to nothing, and a baseline that already has a service worker registered and an IndexedDB identifier written into it defeats the purpose just as thoroughly as a manually cloned profile does. And if a workflow’s idea of “fast setup” is restoring a snapshot of a previous private session to skip onboarding, that restore brings the ephemeral storage back with it, which removes the one property that made it useful in the first place.
The practical takeaway is that “ephemeral” and “incognito” are words worth verifying against actual behavior in DevTools rather than trusting by label, because the underlying architecture genuinely varies between what a regular profile does and what a private one does, and between how different tools implement something they both call a temporary profile.
How anti-detect browsers handle (and don’t handle) service worker storage
It’s worth being precise here rather than making claims about specific vendors that weren’t actually tested. Tools like Multilogin, GoLogin, Kameleo, AdsPower, and Dolphin Anty are all, at their core, Chromium (or in some cases Firefox) forks or wrappers, and each profile they manage gets its own user-data directory. Chromium’s storage partitioning ties Service Worker registrations, Cache Storage, and IndexedDB to that same per-profile directory, right alongside cookies and local storage. That means basic isolation between two separate, freshly created profiles in any of these tools is mostly inherited from the browser engine itself, not something any given vendor had to build from scratch. Two independently created profiles simply don’t share a storage partition, full stop, because Chromium doesn’t let them.
Where meaningful differences show up is in what happens around the edges of that isolation, not in whether isolation exists at the architecture level. Does a profile-cloning or template feature in the tool’s UI copy the entire user-data directory including Application storage, or does it regenerate a clean profile and only copy the fingerprint configuration? Does the tool’s built-in “clear cookies” button in its own interface actually reach Service Worker and Cache Storage data, or does it, like a lot of standalone cookie tools, only touch the cookie jar? Does the tool make it easy to actually inspect what’s sitting in Application storage for a given profile, or is that left entirely to opening DevTools yourself? None of this is something that can be verified from a spec sheet, and none of it makes a tool undetectable or a profile unbannable regardless of how it answers those questions. It’s a question worth actually checking in the tool you’re using rather than assuming either way.
Where isolation breaks: cloned profiles and shared hosts
Beyond the specific example already walked through, there are a few structural patterns worth naming, because they’re not about any one vendor being careless, they’re inherent to any workflow that optimizes for speed.
Template or clone features that exist specifically to skip repetitive setup are, by the same mechanism that makes them useful, capable of copying forward whatever identifiers already got planted in the source profile, unless Application storage is explicitly excluded from what gets duplicated. That applies whether the cloning happens through a tool’s built-in feature or through someone manually copying a user-data directory on disk.
Team workflows compound this. A “golden profile” built once and duplicated across many seats to save onboarding time means every seat inherits the same IndexedDB device ID and the same push subscription for any site that planted one, which is a much stronger and more mechanical correlation across a team than any behavioral fingerprint would produce.
Shared hosts introduce a version of the same problem below the profile layer entirely. A server running dozens of profiles off one disk produces the storage-quota clustering described earlier, but there’s also DNS resolver caching, TLS session resumption tickets, and HTTP/2 connection reuse, none of which live inside a browser profile at all, that can link activity across supposedly separate identities regardless of how clean each individual profile’s Application storage is. TLS session tickets, for instance, are designed to be reused for a window of time specifically so a returning client can skip a full handshake, which means two profiles hitting the same site through the same host’s network stack in quick succession can resume the identical session underneath completely different browser fingerprints. None of these are exotic. They’re all ordinary consequences of running many things on one machine, and no amount of per-profile fingerprint randomization touches them, because they sit at the network and OS layer, not the browser layer.
What detection scripts are actually looking for
Without claiming any specific test result, it’s reasonable to describe what a site interested in repeat-visitor tracking has available to it, since the mechanisms are public and the APIs are documented. A site can check, on page load, whether a service worker is already controlling the page through navigator.serviceWorker.controller. A profile that presents as brand new through its cookies but already has an active controlling service worker for that origin is showing a contradiction that’s easy to flag. A site can read back whatever identifier it previously wrote to IndexedDB or Cache Storage, the way described earlier, which requires no cleverness at all, just consistent code. And a site accepting push subscriptions can compare an incoming subscription endpoint against ones it’s seen tied to other accounts.
Separate from what’s stored, some scripts pay attention to how the storage APIs behave rather than what’s in them: how long service worker registration and activation take, whether registration silently fails in ways that differ from a stock desktop browser, or whether a reported storage quota value looks static in a way real, varied hardware usually doesn’t. None of this is presented as a single decisive signal. It’s one layer that gets folded into a broader trust score alongside canvas and WebGL rendering, font enumeration, TLS handshake characteristics, and IP reputation. Treating it as the one thing that matters, or the one thing that would make a setup safe if handled correctly, misreads how these systems are actually built.
What to check in your own profiles this week
None of the above is a guide to beating a platform’s detection, and nothing in it changes the basic reality that no anti-detect browser makes multi-accounting undetectable, unbannable, or risk-free. What it does change is whether one specific, mechanical leak is present in a given workflow, and that’s worth checking regardless of which tool sits on top.
Open DevTools’ Application tab on a profile before reusing it, and look past the Cookies entry to Service Workers, Cache Storage, and IndexedDB for the origin in question. In Chromium’s own DevTools, that means expanding Storage in the left-hand rail and checking Service Workers, Cache Storage, and IndexedDB as separate rows rather than glancing at the summary total at the top, which can look reassuringly small even while a lingering registration is still active underneath it. If a profile-management workflow includes a clone or template feature, find out concretely whether Application storage is part of what it copies, and whether that’s actually what’s intended for that use case. If a tool’s own “clear site data” control lists cookies but doesn’t clearly say it also touches Service Worker or Cache Storage, don’t assume it does just because the button sounds comprehensive. And keep in mind that storage quota reflects the machine, not the profile, so running many profiles off one disk carries that specific correlation risk no matter which anti-detect browser is installed on top of it.
None of this closes every gap, and it isn’t meant to. It closes one leak that has nothing to do with how good the fingerprint spoofing is and everything to do with whether Application storage got checked before a profile was reused.
If you want the video walkthrough of this alongside hands-on testing of how different anti-detect browsers handle profile storage, head back to the Anti-Detect Review homepage for the rest of the coverage.
Get new guides and videos first — join the Telegram channel.