User Tools

Site Tools


programming:stateful_stateless

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
programming:stateful_stateless [2025/03/18 14:20] – filled with references karelkubicekprogramming:stateful_stateless [2026/08/31 19:48] (current) – Correct the storageState() sentence: measured on Playwright 1.62.1, it does not carry IndexedDB unless {indexedDB:true} is passed, and never carries sessionStorage, Cache Storage or service-worker registrations. Link Privacy:Browser storage for the stores karel.kubicek.claude
Line 1: Line 1:
 ====== Stateful and Stateless Crawling ====== ====== Stateful and Stateless Crawling ======
  
-<wrap todo>This page only contains notes</wrap>+A crawl is **stateless** when the browser starts each visit from an empty profile, and **stateful** when it carries the profile — cookies, ''localStorage'', IndexedDB, the HTTP cache — from one visit to the next. That single switch decides what your crawl is able to observe at all: a crawl that starts every visit from an empty profile and visits each target once cannot see retargeting, cookie respawning, or the effect of a consent choice on the //next// site, because none of those exist without accumulated state. It sees cookie //syncing// — a fresh profile is in fact an unusually attractive target for it, see [[#A crawler sees a different web from a user, and statefulness is part of why|below]] — but only first contact, never the sync graph a real user has accumulated. It also decides how fast you can go, whether your results depend on the order you visited the list in, and how far your numbers can be pushed towards a claim about real users.
  
 +This page is about that design choice. For how one particular tool implements it, see [[Programming:Crawler:OpenWPM#Stateful and stateless in OpenWPM]]; for the tools themselves, [[Programming:Crawler]]; for where to crawl from, [[Design:Crawling location]]; for what to do on the page once you are there, [[Programming:Interaction]] and [[Privacy:Consent]].
  
-Key message: +<WRAP important> 
-  * Majority of web measurements studies use stateless crawls, as it is easy to associate events with the single browsed visited website. Also, stateless crawls do not depend on crawling order and are easier to parallelize. +Three things a fresh measurement gets wrong most often.
-  * Stateful crawling is however more representative of real users, that rarely clear their browser state.+
  
-===== Relevant Literature =====+  - **Almost nobody reports it.** Of the **1,120 papers in our corpus that ran an automated web crawl, 219 (19.6%) say whether the crawl was stateful** — the second-least-reported crawl-configuration field after headless mode, and the **flattest**: its reporting rate moved 2.5 percentage points between the first and last four-year bucket, against +18.2 for naming a browser and +10.1 for headless (see [[#Reporting has not improved in sixteen years]]). 
 +  - **"We cleared cookies" is not a reset.** Measured here on Playwright 1.62.1 / Chromium 151: ''context.clearCookies()'' leaves ''localStorage'' intact //and// leaves the HTTP cache warm, so the next visit serves subresources from disk and never touches the origin. See [[#What a reset actually resets]]. 
 +  - **Since 2022 the browser decides how stateful your stateful crawl is, not you.** Firefox partitions third-party cookies per top-level site by default; Chrome partitions third-party //storage// for every user from Chrome 115 on. Playwright launches Chromium with ''--disable-features=ThirdPartyStoragePartitioning'', Puppeteer does not. Same engine, two different webs. See [[#Since 2022 the engine decides, not you]]. 
 +</WRAP>
  
-Since the majority of publication uses stateless crawlingbelow we list examples of influential publications doing otherwise. However, not all contribute specifically to the question of difference between stateful and stateless crawling.+===== Two wordstwo literatures =====
  
 +Before anything else: **"stateful" and "stateless" mean two unrelated things in this field**, and a keyword search will mix them.
  
-  * [[https://dl.acm.org/doi/pdf/10.1145/3366423.3380104|The Representativeness of Automated Web Crawls as a Surrogate for Human Browsing]] +  * **Crawl statefulness** — this pageA property of //your measurement//: does the browser profile survive between page visits
-    Comparison of stateless crawls with stateful browsing experience of real (Firefoxusers +  **Tracking statefulness** — a property of the //phenomenon//: cookies and other client-side storage ("stateful tracking") versus fingerprinting ("stateless tracking"). Jueckstock et al.'s "Measuring the Privacy vs. Compatibility Trade-off in Preventing Third-Party **Stateful** Tracking" {[jueckstock2022_privacy]} is entirely about the second senseSo is the abstract of Englehardt and Narayanan'1-million-site census {[englehardt2016online]} — in the same paper that runs both //crawl// modes[[Privacy:Cookies]] and [[Privacy:Fingerprinting]] are the pages for the second sense.
-    * Stateless crawls surprisingly  result in more third-party requests than stateful crawl (Fig. 6). +
-  * [[https://dl.acm.org/doi/pdf/10.1145/2976749.2978313|Online Tracking: A 1-million-site Measurement and Analysis]+
-    * The most impactful publication utilizing both stateful and stateless crawls +
-  * [[https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_bashir.pdf|Tracing Information Flows Between Ad Exchanges Using Retargeted Ads]] +
-    * Created "shopper personas" by visiting websites of certain topics and collect advertisement on next websites using these personas +
-  * The web never forgetsPersistent tracking mechanisms in the wild +
-  * Cookies that give you away: The surveillance implications of web tracking+
  
-==== Studies of Stateful Aspects ====+This is not a pedantic distinction. It is a live source of error: one 2025 paper in our corpus is labelled by the extraction as running both crawl modes on the strength of the sentence "Stateful tracking stores explicit identifiers in the browser", while its methods section says "Browser state was purged after every crawl … a fresh Chrome profile for each site". Read the sentence, not the word.
  
-The following studies used stateless crawlsbut were interpreting some stateful properties of web:+===== The axis has three positionsnot two =====
  
 +The literature's vocabulary is binary; its designs are not. Three distinct configurations appear in the corpus, and the extraction's three-valued enum (''stateful'' / ''stateless'' / ''both'') has no slot for the third.
  
-  [[https://hal.science/hal-03218403/file/PETS_21_My_cookie_is_a_phoenix.pdf|My Cookie is phoenix: detectionmeasurement, and lawfulness of cookie respawning with browser fingerprinting]] +^ Design ^ What happens between visits ^ What it buys ^ What it costs ^ 
-    * Evaluation of cookie respawning+**Stateless** | profile discarded and recreated | order-independence; parallelism; each visit is an independent observation | cannot observe anything that depends on accumulation | 
 +| **Stateful** | profile carried forward | cookie syncing, respawning, retargeting, cross-site consent effects, personalisation | order dependence; serial execution; profile bloat; one "user" per browser | 
 +| **Seeded stateless** | a **fixed, pre-built** profile is loaded before every visit and //not// written back | a non-empty starting state that is identical for every siteso order still does not matter | the seed goes stale, and nothing the crawl learns is carried forward |
  
-==== Shallow vs Deep crawling ====+The seeded-stateless design is the one most often mistaken for stateful. Urban et al. state its logic exactly {[urban2020beyond]}:
  
-  * [[https://dl.acm.org/doi/pdf/10.1145/3366423.3380203|Beyond the Front Page: Measuring Third Party Dynamics in the Field]] +> This profile is loaded before each website visit but is not alteredHence, each website visit uses the same profile and the order of visited websites does not impact the results.
-    * Comparison of visiting only front pages vs crawling sub-pages +
-    * Visiting sub-pages increases amount of tracking significantly +
-  * [[https://www.ftc.gov/system/files/documents/public_events/776191/ialtaweelwebpriv_0.pdfWeb Privacy Census]]+
  
-/* +Agarwal et alcombine the two in sequencepersonas are //trained// statefully by browsing stereotypical sitesand then "A HPW crawl with a loaded persona is stateless, i.e., each HPW website visit is independent" {[agarwal2020_stop]}. Englehardt and Narayanan's census does the same thing for scale rather than for personas — build one seed profile serially over the top 10,000 sites, then clone it into parallel browsers {[englehardt2016online]}.
-This is a comment not visible on the pageIt outlines the syntax (for more, go to https://measuretheweb.org/wiki/syntax)especially that related to bibliographyRemove it once you created the pageIf you use any citations (documented at bottom)keep the References section.+
  
-===== Header Level 2 ===== +You also have to say **what the unit of the reset is**, and papers almost never do:
-==== Header Level 3 ====+
  
-=== Links ===+  * per **page visit** (strictest stateless); 
 +  * per **site**, keeping state across that site's subpages — which is what a subpage crawl usually means in practice; 
 +  * per **browser instance**, so a crawl with ''N'' parallel browsers has ''N'' independent cookie jars over an arbitrary partition of your site list, not one user; 
 +  * per **crawl**, never.
  
-External links are recognized automatically: www.google.com, but if you want link text: [[http://www.google.com|This Link points to google]].+===== What reset actually resets =====
  
-Internal links are created by using square bracketsYou can either just give [[pagename]] or use an additional [[pagename|link text]].+"We cleared the browser state between visits" is the most common phrasing in the corpus and the least checkableState lives in more places than the cookie jar, and the API you reach for clears different subset than you think. The table below is **measured**, not recalled: an instrumented local origin sets a server cookie, a JavaScript cookie, a ''localStorage'' marker and an ''immutable''-cached subresource, and the crawler visits it twice with a different reset in between. A ✓ means the state **survived** and visit 2 saw it.
  
-=== Lists ===+^ Reset between visit 1 and visit 2 ^ cookie ^ ''localStorage'' ^ HTTP cache hit ^ 
 +| nothing — a second ''page.goto()'' in the same context | ✓ | ✓ | ✓ | 
 +| ''context.newPage()'' | ✓ | ✓ | ✓ | 
 +| ''context.clearCookies()'' | ✗ | **✓** | **✓** | 
 +| ''clearCookies()'' + ''clearPermissions()'' | ✗ | **✓** | **✓** | 
 +| ''browser.newContext()'' — new context, same browser process | ✗ | ✗ | ✗ | 
 +| a fresh ''chromium.launch()'' (Playwright's default: no ''user-data-dir'') | ✗ | ✗ | ✗ | 
 +| ''launchPersistentContext()'' twice on the **same** ''user-data-dir'' | ✓ | ✓ | ✓ | 
 +| same ''user-data-dir'' + ''clearCookies()'' on relaunch | ✗ | **✓** | **✓** | 
 +| ''storageState()'' saved and reloaded into a new context | ✓ | ✓ | ✗ |
  
-Lists and their levels are decided by indentation (2 spaces = level)+Playwright 1.62.1, Chromium 151.0.7922.34, Linux. Reproduce with [[#The code|the script below]].
  
-  - this is 1item +Read off the three rows in bold**Clearing cookies clears cookies.** It does not clear ''localStorage'', and it does not clear the HTTP cache — in the ''clearCookies()'' rows the cached subresource was never re-requested from the origin, so request-counting measurement silently loses it on every visit after the firstPlaywright's own documentation is accurate and easy to misread: ''clearCookies'' "Removes cookies from context",((Playwright API reference, ''BrowserContext.clearCookies'' and ''BrowserContext.storageState'', checked 2026-08-19.)) and ''storageState'' returns "current cookies, local storage snapshot, IndexedDB snapshot and virtual WebAuthn credentials" — note what is missing from that list, and note that the ''storageState'' row above is the only one where cookies came back while the cache did not.
-  - 2item +
- nested a. item +
-  * bullet-point item+
  
-=== Code ===+The cache matters because it is a tracking channel in its own right, not just a performance detail. Solomos et al. showed that Chrome's **favicon cache** is a separate store that browser "clear browsing data" controls do not touch and that persists into incognito {[solomos2021_tales]}; ETag- and cache-based identifiers have the same property. A crawl whose "stateless" guarantee is ''clearCookies()'' is stateful in exactly the channels that were designed to survive a cookie clear. Acar et al. put the general version of this more starkly {[acar2014_never]}:
  
-For a short inline monospaceuse ''double quote''. For proper code (but in separate paragraph), use ''<code LANG>'':+> once some tracking has happenedit is hard to start from truly clean profile
  
-<code python+The complete list of things you should be able to say you reset, or say you did not: cookies (including partitioned ones), ''localStorage'' and ''sessionStorage'', IndexedDB, Cache Storage and service workers, the HTTP disk cache, the favicon cache, HSTS and TLS session state, DNS cache, permission grants, and the extension state of anything you installed. What each of those stores is as a //measurement target// — whether your instrument can read it at all, whether it is partitioned, and what a per-origin reset looks like — is [[Privacy:Browser storage]]. 
-string = "World+ 
-print(f'Hello {string}')+===== What each design can and cannot measure ===== 
 + 
 +^ Phenomenon ^ Needs ^ Why ^ Example ^ 
 +| Third-party presence, request counts, filter-list hit rates | either, but say which | a fresh profile draws //more// third-party traffic than an aged one, so the two are not interchangeable | {[jueckstock2021_realistic]}, {[zeber2020representativeness]} | 
 +| Cookie syncing / ID sharing | **either, but they measure different things** | a fresh profile sees //first-contact// syncing and over-triggers it {[zeber2020representativeness]}; reconstructing the sync graph of an aged identity, or how much history a partner can merge, needs accumulation | {[englehardt2016online]} runs its sync analysis on the //stateful// 100k crawl; {[agarwal2020_stop]}, {[acar2014_never]} | 
 +| Cookie respawning, evercookies | **stateful** across a clear | the phenomenon //is// state surviving a reset | {[acar2014_never]}; detectable from a stateless harness by comparing paired visits {[fouad2022my]} | 
 +| Ad retargeting, personalisation, differential pricing | **stateful** training, then usually seeded-stateless measurement | the profile is the independent variable | {[bashir2016tracing]}, {[agarwal2020_stop]}, {[liu2024_opted]}, {[meng2014_pollution]}, {[robertson2018_auditing]} | 
 +| Effect of a consent choice on //other// sites | **stateful** | the consent decision only travels via stored state | {[rasaii2025_crumbs]} | 
 +| Consent revocation, opt-out persistence | **stateful** within a session at minimum | you must be in the consented state before you can revoke it | {[kancherla2025_johnny]}, {[liu2024_opted]} | 
 +| Logged-in versus anonymous web | **stateful** (a session) | the session cookie //is// the state | {[kaizer2016_characterizing]}, {[rautenstrauch2024_auth]}, {[rautenstrauch2023_leaky]} | 
 +| First-party-cookie abuse for cross-site tracking | **stateful** | the abuse is the reuse of a first-party value elsewhere | {[chen2021_cookieswap]} | 
 +| Cache-based attacks and leaks | **the cache is the state**, and its contents have to be controlled per URL | a cache hit and a cache miss are the two outcomes you are distinguishing, so "we cleared state" without saying whether the cache was cleared makes the result unreadable | {[mirheidari2022_cache]}, {[solomos2021_tales]} | 
 +| Effect of a blocker or a setting | **either**, but the //same// for both arms | a blocker's effectiveness depends on how much history it has learned from | {[matthews2018_addons]}, {[jueckstock2022_privacy]} | 
 +| Anything you want to parallelise over a million sites | **stateless** | see the next section | {[englehardt2016online]} | 
 + 
 +===== The measured consequences ===== 
 + 
 +==== A crawler sees a different web from a user, and statefulness is part of why ==== 
 + 
 +Zeber et al. compared an OpenWPM crawl against telemetry from over 50,000 opt-in Firefox users over the same period {[zeber2020representativeness]}. The gap is large and consistently in one direction: 
 + 
 +^ Metric, on the same site domains ^ Human users ^ Crawler ^ 
 +| median third-party domains per visit | 4.5 | **11.6** | 
 +| median third-party domains per visit, popularity-weighted | 2.9((The paper gives the human median "dropping 35% to 2.9" under popularity weighting and describes the crawler distribution only as "similar", so no separate weighted crawler median is quoted here.)) | //not restated// | 
 +| median tracking domains per visit (Disconnect list) | 1.9 | **6.1** | 
 +| trackers reached | "up to 8 … in 99% of visits" | "the crawler may reach **26**"((The paper's framing, verbatim, on both sides; it gives a percentile for users and no matching percentile for the crawler, so the two are not strictly comparable.)) | 
 +| Jaccard similarity of the third-party //sets// | median **20%** | — | 
 + 
 +crawler site visits issued requests to a median of 11.6 third-party domains, whereas for visits by humans, the median was 4.5 third parties 
 + 
 +Two cautions. First, this is **crawler versus human**, not stateful versus stateless: automation, vantage point, interaction and statefulness all differ at once, so it is not a clean experiment on this axis. The existing note on this page previously read the paper's Figure 6 as "stateless crawls result in more third-party requests than a stateful crawl"; that is not what the figure compares. Second, the authors' own explanation is nevertheless a statefulness mechanism: 
 + 
 +> cookie syncing is not necessary for users who have already had their cookies synced, whereas a stateless crawler browser instance with a fresh profile would be a clear target for cookie syncing 
 + 
 +And the direction is not universal. Fingerprinting prevalence agreed between crawl and users to within 1 percentage point in the same study — so "crawls over-count tracking" is a claim about third parties and trackers, not about every privacy metric. 
 + 
 +The 2026 restatement of the same problem is much sharper, and it is about interaction as well as state. Song et al. trained nine website-fingerprinting models on traffic from scripted browser automation and tested them on traffic from 30 real users across 20 sites: **every model scored under 10% accuracy**. Training on LLM-agent-generated, persona-driven browsing instead put accuracy "into the 80% range" {[song2026_wfpllm]}. If your measurement is downstream of a model trained on crawler traffic, scripted-crawl realism is not a limitations-section caveat; it is the dominant error term. 
 + 
 +==== Statefulness does not scale, and the standard workaround has a known artefact ==== 
 + 
 +Englehardt and Narayanan are blunt about it {[englehardt2016online]}: 
 + 
 +> Making stateful measurements is fundamentally at odds with parallelism. 
 + 
 +Their own numbers, on one 2016 EC2 ''c4.2xlarge'': 
 + 
 +  * **10** stateful browser instances in parallel, against **20** stateless ones — "stateful parallel measurements are memory-limited while stateless parallel measurements are typically CPU-limited"; 
 +  * the census itself ran **1,000,000 sites stateless** but only **100,000 stateful**. 
 + 
 +The workaround is the seed profile: visit the top 10,000 sites serially, save the profile, clone it into ''N'' parallel browsers. It works well — 
 + 
 +> We find that a seed profile which has visited the top 10,000 sites will have communicated with 76% of all third-party domains present on more than 5 of the top 100,000 sites. 
 + 
 +— but it has an artefact you must report, in the authors' own words: "third parties which don't appear in the top sites if the seed profile will have different cookies set in each of the parallel instances", so a sync partner sees several IDs for one notional user and your sync counts inflate. Acar et al. made the same trade in 2014 and said so {[acar2014_never]}: "except for the sequential crawl (Crawl1), we ran multiple browsers in parallel to extend the reach of the study at the cost of not keeping a profile state (cookies, localStorage) between visits"
 + 
 +==== Order dependence, and what to do about it ==== 
 + 
 +A stateful crawl of a ranked list confounds rank with visit order: by the time you reach rank 10,000 the profile has seen 9,999 sites, so "tracking at low ranks" and "tracking after a lot of browsing" are the same variable. Zeber et al. name the mechanism {[zeber2020representativeness]} — "the results of the crawl may then depend on the accumulated state, e.g., the order of pages visisted" — and Demir et al. make it a reporting requirement {[demir2022_reproducibility]}: 
 + 
 +> In stateful experiments, the order of visited pages potentially impacts the results, and it accounts for HTTP session-specific phenomena, such as opt-in to cookie tracking. Stateless crawls, in turn, allow to study session-independent attributes. 
 + 
 +Three mitigations are in use, in ascending order of cost: 
 + 
 +  - **Go seeded-stateless** and say so, as Urban et al. do, which removes the dependence by construction {[urban2020beyond]}. 
 +  - **Randomise the visit order and publish the seed**, so the confound becomes noise rather than a gradient. Rasaii et al. run their stateful campaign in a randomised order, again in the reverse of that order, and again in a recombined order, precisely so the order effect can be measured rather than assumed away {[rasaii2025_crumbs]}. 
 +  - **Repeat the whole crawl with an independently drawn order** and report the between-run variation. Nobody in our corpus does this at scale; see [[#Open Questions]]. 
 + 
 +==== What a stateful design buys you, quantified ==== 
 + 
 +These are the results that a stateless crawl could not have produced. Each is quoted with the paper's own denominator. 
 + 
 +  * **Consent given on one site follows you to the next.** Rasaii et al. accepted banners across the first half of Tranco's top 20,000 and then measured the second half with that profile loaded — the denominator for the headline figure is the second-half domains where a banner was successfully rejected, not all 20,000. "Our findings reveal that around 50% of websites send at least one intractable cookie" — a tracking cookie transmitted before any consent on the site sending it. Sites with a CMP banner sent **6.91×** more of them than sites with a native banner; enabling Global Privacy Control cut them by about **30%**, with a further **32%** on later visits after rejecting; and about **25%** stop being sent only after the page is reloaded {[rasaii2025_crumbs]}. Partitioning does not yet blunt this: "only 1.3% of all unique tracking cookies are partitioned, with more than half accompanied by nonpartitioned cookies from the same tracker domain"
 +  * **Respawning plus syncing survives a state clear.** The 2014 mechanism is historical — Flash reached end of life in December 2020 — but the finding is the reason a state clear cannot be assumed to work, and the technique moved to fingerprint-keyed respawning rather than disappearing ({[fouad2022my]} in 2022, server-side in {[fouad2024_devil]} in 2024). Acar et al. found "33 different Flash cookies from 30 different domains respawned a total of 355 cookies on 107 first party domains", and concluded that through one ad exchange present on ~11% of first parties, "This scenario enables at least 11% of a user's history to be tracked over time" {[acar2014_never]}. 
 +  * **A trained profile is treated differently.** Agarwal et al.: "having an established persona from a particular demographic … results in up to 15% more cookies stored than for a baseline with no set persona" {[agarwal2020_stop]}. 
 +  * **State accumulates within a site, not only across sites.** Urban et al., under a seeded-stateless design with state kept across a site's own subpages: "subsites set considerably more (36 %cookies than the respective landing pages. On average, 55 cookies were set when loading a landing page while 78 were set when a subsite was accessed" {[urban2020beyond]}. See [[Programming:Interaction]]. 
 + 
 +And one that cuts the other way: **cookie respawning with browser fingerprinting** was measured on 30,000 Alexa sites with a stateless harness, by comparing paired visits rather than by accumulating a profile — "1, 150 (3.83%) of the Alexa top 30, 000 websites use cookie respawning with browser fingerprinting" {[fouad2022my]}. Note the qualifier: that figure counts respawning //combined with// fingerprinting, not respawning in general. A stateful //phenomenon// does not always require a stateful //crawl//; sometimes it requires two controlled visits. The same is true of cookie syncing at first contact. What accumulation buys is the //aged// identity, not the mechanism. 
 + 
 +===== Since 2022 the engine decides, not you ===== 
 + 
 +This is the part of the topic where the literature is out of date and a page written from the corpus alone would mislead. Everything in this section was checked against primary sources on 2026-08-19. 
 + 
 +  * **Firefox partitions third-party cookies by default.** Total Cookie Protection has been on by default since June 2022, "confining cookies to the site where they were created".((Mozilla blog, "Firefox rolls out Total Cookie Protection by default to more users worldwide", 14 June 2022, updated 28 August 2024. Checked 2026-08-19.)) 
 +  * **Chrome partitions third-party //storage// for every user.** "The feature has been enabled for all users on Chrome 115 and later."((Google, //Privacy Sandbox: Storage Partitioning//, ''developers.google.com/privacy-sandbox/cookies/storage-partitioning''. Checked 2026-08-19.)) Cookies are the exception, not the rule, here. 
 +  * **Third-party cookies were //not// deprecated.** On 22 April 2025 Google announced it would "maintain our current approach to offering users third-party cookie choice in Chrome, and will not be rolling out a new standalone prompt for third-party cookies", and in October 2025 confirmed CHIPS and FedCM continue while other Privacy Sandbox APIs are phased out.((Privacy Sandbox, "Next steps for Privacy Sandbox and tracking protections in Chrome", 22 April 2025, and "Update on Plans for Privacy Sandbox Technologies", 17 October 2025. Checked 2026-08-19.)) A 2023-vintage paper that frames its design around imminent third-party cookie removal is describing a future that did not arrive. Chrome's **Incognito mode** does block third-party cookies by default, which is a separate trap: "we ran in incognito for a clean profile" silently also changes the blocking policy. 
 +  * **Your crawler probably turns the partitioning off.** Playwright launches Chromium with ''--disable-features=…,ThirdPartyStoragePartitioning,…''; Puppeteer does not. Measured here: 
 + 
 +^ Chromium feature ^ Playwright 1.62.1 ^ Puppeteer 25.5.0((The same list in Puppeteer 25.8.0, the latest release as of 2026-08-19, is byte-identical, so the comparison is not an artefact of the pinned version.)) ^ 
 +| ''ThirdPartyStoragePartitioning'' | **disabled** | left on | 
 +| ''HttpsUpgrades'' | **disabled** | left on | 
 +| ''IsolateSandboxedIframes'' | left on | **disabled** | 
 +| ''AcceptCHFrame'' | left on | **disabled** | 
 +| ''OptimizationHints'' | disabled | disabled | 
 +| ''Translate'' | disabled | disabled | 
 + 
 +Playwright's own source names the reason, and it is directly about state-carrying: the flag is disabled so that ''storageState'' keeps working. Issue 32230 — "Local storage items set via ''browser.newContext()'' missing for an iframe in Chromium" — was //fixed// by turning partitioning off, and a 2025 request to turn it back on was declined with: 
 + 
 +> our current capabilities of saving/restoring the storage are not exactly compatible with partitioning … Without CDP support, it does not seem practical to replicate all the intricate details of storage partitioning outside of the browser, so disabling the feature is the only way to make things work for now 
 + 
 +((Playwright maintainer, ''github.com/microsoft/playwright/issues/38455'' ("Enable storage partitioning and consider expanding storage state API to support storage keys", opened 2025-12-05), comment of 2025-12-09. The issue was closed on 2025-12-22 after the corresponding Chromium request, ''crbug.com/468317746'', was closed as "infeasible - too far outside of the product scope". Issue 32230 was closed 2024-09-27, fixed by PR 32701, "fix(chromium): disable ThirdPartyStoragePartitioning", merged 2024-09-19. All checked 2026-08-19.)) 
 + 
 +So the consequence is that two crawlers driving the same engine version accumulate different third-party state, on the one axis this page is about, and the divergence exists because one of them has a profile-serialisation API that cannot express partitioned storage. Neither documents this where you would look. 
 + 
 +**And it is a moving target.** In the same thread, the person who filed the request notes that "when the ThirdPartyStoragePartitioning flag is removed, bug #32230 will start reoccurring" — that is, Playwright's opt-out is expected to stop being available, and as late as January 2026 the maintainers were still asking the reporter for a design that would keep ''storageState'' working without the flag. Whenever that lands, a Playwright crawl starts accumulating //partitioned// storage with no change to your code, at whatever version boundary it happens on. Pin and report the Playwright version alongside the statefulness claim. 
 + 
 +  * **OpenWPM also opts out, by default.** ''BrowserParams.tp_cookies'' defaults to ''"always"'', which sets ''network.cookie.cookieBehavior = 0'' — all third-party cookies allowed, unpartitioned. Firefox tracking protection cannot be switched on at all: the code raises ''RuntimeError("Firefox Tracking Protection is not currently supported")''.((OpenWPM ''openwpm/config.py'' and ''openwpm/deploy_browsers/configure_firefox.py'', read at ''master'' commit ''b9dd4c3a'' (2026-07-02); latest release ''v0.35.0'' (2026-06-17). Checked 2026-08-19.)) 
 + 
 +So the plain fact is that a stateful research crawl in 2026 accumulates an **unpartitioned** cross-site profile. That resembles a default Chrome user's //cookie jar// — but not that user's storage, which Chrome has partitioned since 115 — and it does not resemble a default Firefox or Safari user in either respect. And it happens whichever engine you drive, because the research tooling disables the partitioning. Whether that is the right choice depends on your question; it is never the right thing to leave unsaid. Measured, on the default Playwright Chromium context: 
 + 
 +<code> 
 +Engine                  third party got its cookie back on the SECOND, different site 
 +----------------------  ---------------------------------------------------------- 
 +Chromium 151.0.7922.34  YES — sent "tp=third-party-id"
 </code> </code>
  
-For large code, use ''<file LANG filename>'', it will make code downloadableFor instance:+We could not run the same probe on Playwright's Firefox in this container — headless dies with ''RenderCompositorSWGL failed mapping default framebuffer'' and headed needs a ''dbus'' the image lacks — so **the Firefox row is absent rather than guessed**, and the Firefox claim above rests on Mozilla's documentation. 
 + 
 +===== How to do it ===== 
 + 
 +==== Stateless ==== 
 + 
 +In Playwright and Puppeteer you get this by accident, which is both convenient and a reporting hazard: a fresh ''browser.newContext()'' or a fresh ''launch()'' has an empty profile, so the default is stateless and a paper that says nothing has still made a choice. Be explicit about the unit — a new **context** per site is cheap and isolates cache and storage as well as cookies (the ''browser.newContext()'' row above), whereas ''clearCookies()'' does not. 
 + 
 +==== Stateful ==== 
 + 
 +  * **Playwright:** ''chromium.launchPersistentContext(userDataDir)'' and reuse ''userDataDir''. Everything persists, including the cache. To carry a profile //deliberately and legibly// instead, use ''storageState()'' — it serialises cookies and ''localStorage'' to JSON you can commit as an artefact, which makes the seed reproducible in a way a binary profile directory is not. **IndexedDB is behind an option that is off by default** (''storageState({ indexedDB: true })''), and ''sessionStorage'', Cache Storage and service-worker registrations are not in it at all; measured, on Playwright 1.62.1, in [[Privacy:Browser storage#What each capture method actually returns]]. It does not carry the HTTP cache. 
 +  * **Puppeteer:** ''puppeteer.launch({ userDataDir })'' and reuse the directory — the same mechanism as Playwright's persistent context, and worth knowing because Puppeteer is the more used of the two in this corpus (76 crawling papers against Playwright's 34). Puppeteer has no ''storageState'' equivalent, so a legible seed means either shipping the profile directory or writing your own cookie/storage dump. 
 +  * **OpenWPM:** stateful is the **default**, and stateless is per-command-sequence: ''CommandSequence(url, reset=True)'', documented as "True if browser should clear state and restart after sequence".((OpenWPM ''openwpm/command_sequence.py'' at ''master'' commit ''b9dd4c3a'', checked 2026-08-19.)) There is no global switch, which is why papers describe this in prose and reviewers cannot check it. Watch ''num_browsers'': with ''N'' browsers your "stateful crawl" is ''N'' cookie jars. Details on [[Programming:Crawler:OpenWPM#Stateful and stateless in OpenWPM]]. 
 +  * **Seeding:** build the seed in a separate, documented run; store it (''storageState'' JSON, or OpenWPM's ''seed_tar''); record when it was built and what it visited. A seed profile ages — 2016's top 10,000 sites are not 2026's, and a seed built before a crawl that ran for three weeks is not the same instrument at the end as at the start. 
 + 
 +==== The code ==== 
 + 
 +This is the **complete** script behind the [[#What a reset actually resets|reset table]] — all nine reset strategies, so every row is reproducibleSave the two files side by side as ''server.mjs'' and ''probe.mjs''; the second imports the first. It needs nothing but Playwright and a free port. 
 + 
 +<file javascript server.mjs> 
 +// Minimal instrumented origin for the state-channel probe. Counts every 
 +// request it receives, per path, and reports what the client sent back. 
 +import http from 'node:http';
  
-<file php example.php+export function startServer(port = 8123) { 
-<?php echo "hello world!"; ?>+  const log = []; 
 +  const server = http.createServer((req, res) ={ 
 +    log.push({ path: req.url, cookie: req.headers.cookie ?? null, ims: req.headers['if-none-match'] ?? null }); 
 +    if (req.url === '/') { 
 +      res.writeHead(200,
 +        'content-type': 'text/html; charset=utf-8', 
 +        'set-cookie': 'srv=server-set; Path=/; Max-Age=86400', 
 +        'cache-control': 'no-store', 
 +      }); 
 +      res.end(`<!doctype html><title>probe</title> 
 +<script src="/cached.js"></script> 
 +<script> 
 +  document.cookie = 'js=js-set; path=/; max-age=86400'; 
 +  // Stamp a marker ONCE. A later visit that still sees the FIRST visit's marker 
 +  // proves localStorage survived; one that writes its own proves it did not. 
 +  window.__lsBefore = localStorage.getItem('ls'); 
 +  if (!window.__lsBefore) localStorage.setItem('ls', 'visit-' + Date.now()); 
 +</script> 
 +<img src="/cached.png">`); 
 +      return; 
 +    } 
 +    if (req.url === '/cached.js') { 
 +      // Aggressively cacheable: a second visit should not hit the network. 
 +      res.writeHead(200, { 'content-type': 'application/javascript', 'cache-control': 'public, max-age=31536000, immutable' }); 
 +      res.end('window.__cached = true;'); 
 +      return; 
 +    } 
 +    if (req.url === '/cached.png') { 
 +      res.writeHead(200, { 'content-type': 'image/png', 'cache-control': 'public, max-age=31536000, immutable' }); 
 +      res.end(Buffer.from('89504e470d0a1a0a0000000d49484452000000010000000108060000001f15c4890000000a49444154789c6300010000050001', 'hex')); 
 +      return; 
 +    } 
 +    res.writeHead(404, { 'cache-control': 'no-store' }); 
 +    res.end('nope'); 
 +  }); 
 +  return new Promise((resolve) =server.listen(port, '127.0.0.1', () => resolve({ server, log }))); 
 +}
 </file> </file>
  
-=== Figures ===+<file javascript probe.mjs> 
 +// What each "reset" actually resets. Drives Playwright's own Chromium against a 
 +// local instrumented origin and reports, for each reset strategy, whether the 
 +// second visit still carried a cookie, still had localStorage, and still served 
 +// the cacheable subresource from cache instead of the network. 
 +// 
 +//   npm i playwright && npx playwright install chromium 
 +//   node scripts/state_probe/probe.mjs 
 +// 
 +// Read as: a ✓ under "cookie", "localStorage" or "cache hit" means state 
 +// SURVIVED the reset. A stateless crawl needs all three to be ✗. 
 +import fs from 'node:fs'; 
 +import os from 'node:os'; 
 +import path from 'node:path'; 
 +import { chromium } from 'playwright'; 
 +import { startServer } from './server.mjs';
  
-To use floatsyou have to use the ''<WRAP>'' tagFor instance, the following will create figure on the right side 50% large+const PORT = 8123; 
-<WRAP right 50% box+const TARGET = `http://127.0.0.1:${PORT}/`; 
-{{PATH_TO_FILE|ALT_TEXT}} +const { serverlog } = await startServer(PORT); 
-<div>CAPTION</div>+ 
 +const tmp = () => fs.mkdtempSync(path.join(os.tmpdir(), 'pw-profile-')); 
 + 
 +// Visit the page and report what the origin saw and what the page found. 
 +async function visit(page) { 
 +  const before = log.length; 
 +  await page.goto(TARGET, { waitUntil: 'load}); 
 +  await page.waitForTimeout(400); 
 +  const hits = log.slice(before); 
 +  return { 
 +    cookieSentOnDoc: hits.find((h) =h.path === '/')?.cookie ?? null, 
 +    cachedJsFromNetwork: hits.some((h) => h.path === '/cached.js'), 
 +    cachedPngFromNetwork: hits.some((h) => h.path === '/cached.png'), 
 +    // __lsBefore is what the page found BEFORE writing its own marker, so it is 
 +    // non-null only when localStorage genuinely survived into this visit. 
 +    lsCarriedIn: await page.evaluate(() => window.__lsBefore ?? null), 
 +    lsNow: await page.evaluate(() => localStorage.getItem('ls')), 
 +    jarCookies: (await page.context().cookies()).map((c) => c.name).sort().join(','), 
 +  }; 
 +
 + 
 +const mark = (b) => (b ? '✓' : '✗'); 
 +const results = []; 
 +const record = (strategy, second) => 
 +  results.push({ 
 +    strategy, 
 +    cookie: mark(!!second.cookieSentOnDoc), 
 +    localStorage: mark(second.lsCarriedIn !== null), 
 +    cacheHit: mark(!second.cachedJsFromNetwork), 
 +    detail: 
 +      `visit 2 sent Cookie: ${second.cookieSentOnDoc ?? '(none)'}; ` + 
 +      `localStorage carried in: ${second.lsCarriedIn ?? '(none)'}; ` + 
 +      `/cached.js re-requested from origin: ${second.cachedJsFromNetwork ? 'yes' : 'no'}`, 
 +  }); 
 + 
 +// 1. Same page object, second navigation. 
 +
 +  const b = await chromium.launch(); 
 +  const c = await b.newContext(); 
 +  const p = await c.newPage(); 
 +  await visit(p); 
 +  record('nothing — second page.goto() in the same context', await visit(p)); 
 +  await b.close(); 
 +
 +// 2. New page in the same context. 
 +
 +  const b = await chromium.launch(); 
 +  const c = await b.newContext(); 
 +  await visit(await c.newPage()); 
 +  record('context.newPage()', await visit(await c.newPage())); 
 +  await b.close(); 
 +
 +// 3. context.clearCookies() only. 
 +
 +  const b = await chromium.launch(); 
 +  const c = await b.newContext(); 
 +  const p = await c.newPage(); 
 +  await visit(p); 
 +  await c.clearCookies(); 
 +  record('context.clearCookies()', await visit(p)); 
 +  await b.close(); 
 +
 +// 4. clearCookies() + clearPermissions() (the usual "we cleared cookies" claim). 
 +
 +  const b = await chromium.launch(); 
 +  const c = await b.newContext(); 
 +  const p = await c.newPage(); 
 +  await visit(p); 
 +  await c.clearCookies(); 
 +  await c.clearPermissions(); 
 +  record('clearCookies() + clearPermissions()', await visit(p)); 
 +  await b.close(); 
 +
 +// 5. New browser CONTEXT in the same browser process. 
 +
 +  const b = await chromium.launch(); 
 +  const c1 = await b.newContext(); 
 +  await visit(await c1.newPage()); 
 +  const c2 = await b.newContext(); 
 +  record('browser.newContext() — new context, same browser process', await visit(await c2.newPage())); 
 +  await b.close(); 
 +
 +// 6. Fresh browser.launch() — Playwright's non-persistent default. 
 +
 +  const b1 = await chromium.launch(); 
 +  await visit(await (await b1.newContext()).newPage()); 
 +  await b1.close(); 
 +  const b2 = await chromium.launch(); 
 +  record('fresh chromium.launch() (Playwright default, no user-data-dir)', await visit(await (await b2.newContext()).newPage())); 
 +  await b2.close(); 
 +
 +// 7. launchPersistentContext, same user-data-dir, relaunched. 
 +
 +  const dir = tmp(); 
 +  const c1 = await chromium.launchPersistentContext(dir); 
 +  await visit(await c1.newPage()); 
 +  await c1.close(); 
 +  const c2 = await chromium.launchPersistentContext(dir); 
 +  record('launchPersistentContext() twice on the SAME user-data-dir', await visit(await c2.newPage())); 
 +  await c2.close(); 
 +
 +// 8. launchPersistentContext, same dir, clearCookies() in between. 
 +
 +  const dir = tmp(); 
 +  const c1 = await chromium.launchPersistentContext(dir); 
 +  await visit(await c1.newPage()); 
 +  await c1.close(); 
 +  const c2 = await chromium.launchPersistentContext(dir); 
 +  await c2.clearCookies(); 
 +  record('same user-data-dir + clearCookies() on relaunch', await visit(await c2.newPage())); 
 +  await c2.close(); 
 +
 +// 9. storageState round-tripthe documented way to carry a profile on purpose. 
 +
 +  const b = await chromium.launch(); 
 +  const c1 = await b.newContext(); 
 +  await visit(await c1.newPage()); 
 +  const state = await c1.storageState(); 
 +  await c1.close(); 
 +  const c2 = await b.newContext({ storageState: state }); 
 +  record('storageState() saved and reloaded into a new context', await visit(await c2.newPage())); 
 +  await b.close(); 
 +  fs.writeFileSync( 
 +    path.join(import.meta.dirname, 'storagestate-sample.json'), 
 +    JSON.stringify(state, null, 1) 
 +  ); 
 +
 + 
 +const W = Math.max(...results.map((r) =r.strategy.length)); 
 +console.log( 
 +  ['Reset between visit 1 and visit 2'.padEnd(W), 'cookie', 'localStorage', 'cache hit'].join('  ') 
 +); 
 +console.log([('-'.repeat(W)), '------', '------------', '---------'].join('  ')); 
 +for (const r of results) 
 +  console.log([r.strategy.padEnd(W), r.cookie.padEnd(6), r.localStorage.padEnd(12), r.cacheHit].join('  ')); 
 +console.log('\n✓ = the state SURVIVED the reset and visit 2 saw it. A stateless crawl needs ✗ in all three columns.'); 
 +console.log('"cache hit" ✓ means the immutable subresource was NOT re-requested from the origin.\n'); 
 +for (const r of results) console.log(`  ${r.strategy}\n      ${r.detail}`); 
 +
 +  const pkg = JSON.parse( 
 +    fs.readFileSync(new URL('./package.json', import.meta.resolve('playwright')), 'utf8'
 +  ); 
 +  const b = await chromium.launch(); 
 +  console.log(`\nplaywright ${pkg.version}; chromium ${b.version()}; ${process.platform}`); 
 +  await b.close(); 
 +
 +server.close(); 
 +</file> 
 + 
 +===== Use in Publications ===== 
 + 
 +All figures below are over the **1,120 papers in the corpus that ran an automated web crawl**, out of 5,859 extracted papers from CCS, IMC, NDSS, PETS, USENIX Security, TheWebConf and IEEE S&P, 2010–2026. They are reporting rates: "does not state" means the paper did not say, not that the crawl had no state. The figures come from three scripts — ''report_stateful_stateless.mjs'' for the tables, ''statefulness_audit.mjs'' for the 29-paper adjudication, ''statefulness_probe.mjs'' for the text-corroboration counts — and the full query log, with each script's unedited output, is on [[provenance:programming:stateful_stateless]]. 
 + 
 +==== Almost nobody says ==== 
 + 
 +^ crawlConfig.statefulness ^ Papers ^ Share of 1,120 crawling papers ^ 
 +| stateless | 113 | 10.1% | 
 +| stateful | 77 | 6.9% | 
 +| both arms | 29 | 2.6% | 
 +| **not stated** | 844 | **75.4%** | 
 +| not applicable | 17 | 1.5% | 
 +//no crawl-configuration record at all// | 40 | 3.6% | 
 + 
 +**219 of 1,120 (19.6%)** state it. Among those 219: stateless 51.6%, stateful 35.2%, both arms 13.2%. Against the other configuration fields the same papers could have reported: 
 + 
 +^ Field ^ Papers stating it ^ Share of 1,120 ^ 
 +| Interaction depth | 841 | 75.1% | 
 +| Authentication | 779 | 69.6% | 
 +| At least one browser named | 529 | 47.2% | 
 +| Consent action | 349 | 31.2% | 
 +| **Stateful or stateless** | **219** | **19.6%** | 
 +| Headless or headful | 140 | 12.5% | 
 + 
 +An external cross-check disagrees, informatively — and it is a close comparison, because it covers **the same seven venues**. Demir et al. hand-coded 117 web-measurement papers from 2016–2021 against 18 reproducibility criteria; their criterion C11, "describe crawling strategy", derived from exactly this design question, was **omitted by 41%**, partially met by 12% and fully satisfied by 44% {[demir2022_reproducibility]}. Partial plus satisfied is **56%**, which is 2.9 times our 19.6%.((The 56% is our arithmetic on their Table 2, not a figure they state. Their categories are N/A 3%, Omit 41%, Undocumented 12%, Satisfied 44%.)) Both can be right, and the reason is not venue coverage: their 117 papers are hand-picked as //web measurements// from those venues, while our 1,120 are every paper the extraction found to have run a crawl, including a long tail that crawls incidentally to something else. Their "crawling strategy" is also read more broadly than the stateful/stateless enum. Treat 19.6% as the rate across everything that crawls in these venues, and ~56% as the rate among papers whose main contribution is a web measurement. 
 + 
 +==== Reporting has not improved in sixteen years ==== 
 + 
 +^ Bucket ^ Crawling papers ^ State it ^ Share stating ^ stateless ^ stateful ^ both ^ stateless share of stated ^ 
 +| 2010–2013 | 102 | 16 | 15.7% | 7 | 8 | 1 | 43.8% | 
 +| 2014–2017 | 167 | 35 | 21.0% | 14 | 15 | 6 | 40.0% | 
 +| 2018–2021 | 308 | 61 | 19.8% | 31 | 21 | 9 | 50.8% | 
 +| 2022–2024 | 345 | 71 | 20.6% | 42 | 22 | 7 | 59.2% | 
 +| 2025–2026* | 198 | 36 | 18.2% | 19 | 11 | 6 | 52.8% | 
 + 
 +<WRAP info> 
 +**2025–2026 is provisional:** CCS 2026 and IMC 2026 have not been held, and IEEE S&P 2026 and WWW 2026 abstracts are absent from OpenAlex, on which paper selection depends. The bucket is under-represented by construction, not by relevance.
 </WRAP> </WRAP>
  
-*/+This is the finding, and it is easiest to see against reporting norms that //did// move. Same buckets, same corpus:
  
-====== References ======+^ Bucket ^ States statefulness //(of crawling papers)// ^ Releases an artifact link //(of all papers)// ^ Mentions an ethics review //(of empirical papers)// ^ 
 +| 2010–2013 | 16/102 **15.7%** | 121/511 23.7% | 47/460 10.2% | 
 +| 2014–2017 | 35/167 **21.0%** | 295/769 38.4% | 155/718 21.6% | 
 +| 2018–2021 | 61/308 **19.8%** | 728/1439 50.6% | 378/1272 29.7% | 
 +| 2022–2024 | 71/345 **20.6%** | 1270/1955 65.0% | 681/1649 41.3% | 
 +| 2025–2026* | 36/198 = **18.2%** | 907/1185 = 76.5% | 467/1019 = 45.8% |
  
-/* +Artifact release more than tripled and ethics-review reporting more than quadrupled. Statefulness has sat between 16% and 21% throughoutwith no trend. It is also the flattest of the crawl-configuration fields, which is the sharper version of the claim because those fields compete for the same paragraph of the same methods section:
-To insert citationsfollow these steps:+
  
-  - Verify the BibTeX entry exists in https://measuretheweb.org/literature/bibliographyIf not, add it there+^ Field ^ 2010–2013 ^ 2014–2017 ^ 2018–2021 ^ 2022–2024 ^ 2025–2026* ^ max−min ^ last − first ^ 
-  - Use {[CitationKey]} where needed in the text; it will render as a numbered reference+| ''interactionDepth'' | 78.4% | 75.4% | 76.9% | 73.9% | 72.2% | 6.2 pp | **−6.2 pp** | 
-  - Keep this section unchanged to display the bibliography.+| ''authentication'' | 59.8% | 70.1% | 69.2% | 72.8% | 69.2% | 12.9 pp | +9.4 pp | 
 +| ''browsers'' (≥1 named) | 32.4% | 48.5% | 49.7% | 47.0% | 50.5% | 18.2 pp | **+18.2 pp** | 
 +| ''consentAction'' | 24.5% | 29.9% | 32.1% | 33.6% | 29.8% | 9.1 pp | +5.3 pp | 
 +| **''statefulness''** | 15.7% | 21.0% | 19.8% | 20.6% | 18.2% | **5.3 pp** | **+2.5 pp** | 
 +| ''headless'' | 1.0% | 15.6% | 13.3% | 14.5% | 11.1% | 14.6 pp | +10.1 pp |
  
-If any step fails, a purple warning will appear on the preview page. +Denominators are the crawling papers in each bucket, from the table above (102 / 167 / 308 / 345 / 198). Naming the browser gained 18 points and headless mode gained 10 from a near-zero base; statefulness gained 2.5 and has the narrowest **range** of the six (5.3 pp). Interaction depth is the only field whose range is nearly as narrow (6.2 pp), and it got that way by //declining// from 78.4% to 72.2% rather than by standing still. It is not that the field decided the axis does not matter — Demir et al. made it a named criterion in 2022, and Zeber et al. and Jueckstock et al. had made it a measured concern in 2020 and 2021. It is that nothing turned the concern into a reporting norm: no venue asks for it on a checklist, and no widely used tool writes it into a config file that ends up in an artifact. 
-*/+ 
 +What //did// move is the answer among those who give one: **the stateless share of stated values rose from 43.8% into the 50s** (50.8%, 59.2%, 52.8% over the last three buckets). Read this as the field's default hardening rather than as a swing in practice — the whole cell is small (16 papers in the first bucket), and the modern tooling defaults to stateless. 
 + 
 +==== By venue ==== 
 + 
 +^ Venue ^ Crawling papers ^ State it ^ Share stating ^ stateless ^ stateful ^ both ^ 
 +| WWW | 242 | 45 | 18.6% | 20 | 19 | 6 | 
 +| USENIX | 221 | 30 | 13.6% | 17 | 12 | 1 | 
 +| CCS | 163 | 27 | 16.6% | 11 | 10 | 6 | 
 +| IMC | 132 | 28 | 21.2% | 17 | 9 | 2 | 
 +| NDSS | 129 | 24 | 18.6% | 15 | 7 | 2 | 
 +| PETS | 123 | 42 | **34.1%** | 22 | 11 | 9 | 
 +| IEEE-SP | 110 | 23 | 20.9% | 11 | 9 | 3 | 
 + 
 +PETS states it at 34.1% — about 60% more often than the next venue (IMC, 21.2%) and two and a half times as often as USENIX Security (13.6%) — and holds 9 of the 29 both-arms papers on just over half of USENIX's crawling volume. PETS is where this reporting norm is strongest. 
 + 
 +==== The instrument decides whether you say it ==== 
 + 
 +^ Framework family ^ Crawling papers ^ State it ^ Share stating ^ stateless ^ stateful ^ both ^ 
 +| OpenWPM | 58 | 32 | **55.2%** | 15 | 12 | 5 | 
 +| Vulnerability / state-space crawlers | 29 | 11 | 37.9% | 4 | 7 | 0 | 
 +| Puppeteer | 76 | 27 | 35.5% | 18 | 6 | 3 | 
 +| Playwright | 34 | 12 | 35.3% | 6 | 3 | 3 | 
 +| Tracker Radar Collector | 10 | 3 | 30.0% | 2 | 0 | 1 | 
 +| Selenium | 242 | 67 | 27.7% | 31 | 26 | 10 | 
 +| //any framework named// | 723 | 182 | 25.2% | 91 | 68 | 23 | 
 +| //no framework named// | 397 | 37 | **9.3%** | 22 | 9 | 6 | 
 + 
 +OpenWPM papers state it at **six times** the rate of papers that do not name a framework, and twice the rate of Selenium papers. The mechanism is not virtue but interface: OpenWPM's ''CommandSequence'' has a ''reset'' argument and its documentation names the choice, so authors have a word for what they did. Selenium hands you a fresh session and no vocabulary. ([[Programming:Crawler:OpenWPM]] reports 33 of 60 (55.0%) using a wider definition of "an OpenWPM paper" — any ''tools[]'' tuple whose name matches OpenWPM, regardless of the category the extractor filed it under, and without restricting to the crawling population. Applying that name match inside the crawling population gives 33 of 59 (55.9%). Both definitions are computed by this page's report script, so the two pages cannot drift.) 
 + 
 +==== Designs whose result cannot be read without it ==== 
 + 
 +^ Subset of crawling papers ^ N ^ State statefulness ^ Share stating ^ stateless ^ stateful ^ both ^ 
 +| Crawls that acted on a consent notice | 36 | 22 | **61.1%** | 11 | 4 | 7 | 
 +| …the 28 of those whose interaction was verified by hand | 28 | 16 | **57.1%** | 8 | 3 | 5 | 
 +| Crawls that logged in | 90 | 54 | **60.0%** | 7 | 39 | 8 | 
 +| Repeat-visit designs (2 or more visits per target) | 199 | 85 | 42.7% | 49 | 21 | 15 | 
 +| Crawls beyond the landing page | 303 | 83 | 27.4% | 30 | 40 | 13 | 
 +| Deep crawls | 157 | 40 | 25.5% | 8 | 26 | 6 | 
 +| //all crawling papers// | 1,120 | 219 | 19.6% | 113 | 77 | 29 | 
 + 
 +The consent row needs a caveat that [[privacy:consent]] supplies: the same 36 papers were hand-audited there and **7 (19.4%) turned out to be extraction false positives** — they never touched a banner. The second row recomputes the rate on the 28 the audit **fully** supported (a 29th is supported but with an overstated enum value), and it barely moves, so the finding is robust to the error. 
 + 
 +The good news first: where the design makes the axis unavoidable, reporting roughly triples. A login is state, and 39 of the 54 login crawls that say anything say stateful. The bad news is the repeat-visit row: **199 papers visit the same target two or more times and 114 of them (57.3%) never say whether state carried between the visits** — which is the one thing that determines whether the repeat visit is a replication or a second step in a sequence. If you take one reporting rule from this page, take that one. 
 + 
 +==== One word, two literatures, in the data ==== 
 + 
 +Folding the 219 stating papers by subject matter (keyword match over slug, ''detection.phenomenon'' and classification target) shows the two vocabularies of [[#Two words, two literatures]] both present, and shows that "stateful" leans towards application-security scanning: 
 + 
 +^ Subject matter ^ Papers stating statefulness ^ stateless ^ stateful ^ both ^ 
 +| tracking / privacy measurement | 133 | 78 | 35 | 20 | 
 +| web-application security scanning | 23 | 7 | 14 | 2 | 
 +| both vocabularies present | 18 | 6 | 9 | 3 | 
 +| neither (unmatched residue) | 45 | 22 | 19 | 4 | 
 + 
 +In the tracking literature stateless outnumbers stateful more than two to one; in the scanning literature it is the reverse, because there "state" means the application's own session and database, and coverage depends on reaching it. The 45-paper residue is largely papers that are not web crawls in either sense — an NTP-pool robustness study, a carrier-grade-NAT deployment study, a commercial-VPN ecosystem study, a 5G performance study, several underground-marketplace studies — and it is printed in full in the report output so it does not vanish quietly. 
 + 
 +==== The comparison studies, audited ==== 
 + 
 +The 29 papers labelled ''both'' are the page's most load-bearing set: they are the studies that ran a stateful and a stateless arm and can therefore tell you what the choice costs. Because ''crawlConfig'' carries **one** evidence quote for the whole configuration object, the dataset's usual "spot-check the quote" discipline cannot validate this field at all — the quote behind a ''statefulness'' value is as likely to be evidence for the browser or the interaction depth. So all 29 were read in full against their own text. 
 + 
 +^ Verdict ^ Papers ^ Share of 29 ^ What it means ^ 
 +| ok | 16 | 55.2% | a stateful arm and a stateless arm really were both run | 
 +| partial | 10 | 34.5% | two conditions exist, but the contrast is login, seeding or consent, not statefulness | 
 +| wrong | 3 | 10.3% | no stateful-versus-stateless contrast in the paper at all | 
 + 
 +So the corpus holds **16 genuine comparison studies out of 1,120 crawling papers (1.4%)**, not 29 (2.6%). Use the 16 as a reading list and not the 29. Here they are, with what the two arms actually were: 
 + 
 +^ Paper ^ The two arms ^ 
 +| {[acar2014_never]} | one sequential crawl keeping profile state, plus parallel crawls that do not | 
 +| {[meng2014_pollution]} | profiles polluted by a CSRF-style attack, against clean profiles replayed from user traces | 
 +| {[pan2015_summer]} | each site visited "once starting with a clean browser and once more after priming the client-side state" | 
 +| {[englehardt2016online]} | //Default Stateless// over 1M sites beside //Default Stateful// over 100k | 
 +| {[matthews2018_addons]} | blockers measured with no browsing history, then again post-calibration | 
 +| {[englehardt2018_email]} | each email loaded twice: fresh profile, then the same profile again | 
 +| {[robertson2018_auditing]} | a standard window and an incognito window driven side by side | 
 +| {[agarwal2020_stop]} | personas trained statefully, then measured stateless | 
 +| {[chen2021_cookieswap]} | repeat visits retaining state alongside fresh-profile visits | 
 +| {[mehrnezhad2022_protect]} | consent accepted on visit two and opted out of on visit three, plus a private-mode arm | 
 +| {[mirheidari2022_cache]} | per-URL cache hit against cache miss, verified for each candidate | 
 +| {[rautenstrauch2023_leaky]} | logged-in state against anonymous, "a fresh browser context that we reset between"
 +| {[liu2024_opted]} | personas accumulating over nine iterated visits, against control personas | 
 +| {[rautenstrauch2024_auth]} | the same site crawled twice in parallel, once with a session | 
 +| {[rasaii2025_crumbs]} | banners accepted statefully on the first half of the list, measured on the second | 
 +| {[ablove2026_censorship]} | persistent browser sessions for most services, fresh sessions for the one with a query limit | 
 + 
 +Ten more are labelled ''both'' but contrast something else — a login, a seeded profile, an extension, a consent step — and three have no statefulness contrast at all. Across all 219 stated values, a mechanical text probe finds a state-management sentence in the paper's own text for 178 (81.3%) and none for 41 (18.7%); the shared configuration quote itself contains a state term for only 72 (32.9%), which is the clearest possible demonstration that it is not evidence for this field. The 18.7% is an upper bound on false positives, not a measurement of them — hand-reading showed some are misses by the probe's regex rather than errors in the extraction. Full verdicts and reasoning: [[provenance:programming:stateful_stateless]]. 
 + 
 +==== Methodology and limitations of these figures ==== 
 + 
 +  * **Population.** ''crawled'' = a crawl-configuration record exists **or** ''studyTypes'' includes ''automated-web-crawl'': 1,120 papers. 1,080 of them have a configuration record; the field can only be stated on those, so 19.6% (of 1,120) and 20.3% (of 1,080) are both correct and the page uses the first, because a paper with no configuration record has certainly not told you
 +  **Stability.** ''crawlConfig.statefulness'' agreed on 98% of papers between two independent extraction runs over identical text, which is why exact percentages are published here rather than rankings. That figure was measured on the previous, 4,322-paper corpus and has not been re-measured on this one; treat it as the right order of magnitude. 
 +  * **The evidence quote does not evidence this field.** See [[#The comparison studies, audited]]. This is the single biggest threat to every number above, and it is why the audit exists. 
 +  * **Reporting, not practice.** 75.4% "not stated" is a claim about papers, not about crawls. 
 +  * **Seven venues.** EuroS&P, ACSAC, RAID, AsiaCCS, CHI and SOUPS are absent, so this is a claim about CCS, IMC, NDSS, PETS, USENIX Security, TheWebConf and IEEE S&P. 
 +  * **Full query log, folding rules, residue, quote checks and reviewer findings:** [[provenance:programming:stateful_stateless]]. Corpus-level caveats: [[literature:corpus]]. 
 + 
 +===== What to report ===== 
 + 
 +Demir et al. set the bar {[demir2022_reproducibility]}: 
 + 
 +> authors need to document what part of a browser profile is maintained statefully, what part is reset, and when 
 + 
 +Concretely, one short paragraph in your methodology, covering: 
 + 
 +  - **Stateful, stateless or seeded**, in those words. 
 +  - **The unit of the reset** — per page visit, per site, per browser instance, per crawl. 
 +  - **What exactly is reset**, given that "we cleared cookies" leaves ''localStorage'' and the cache: name the storage kinds, or name the mechanism (a fresh ''user-data-dir'', a new ''BrowserContext'', ''CommandSequence(reset=True)''). 
 +  - **The seed's provenance**, if any: what built it, when, over which sites, and whether it is published as an artefact. 
 +  - **Number of parallel browsers**, alongside the stateful claim, because ''N'' browsers is ''N'' users. 
 +  - **Visit order** and whether it was randomised, with the seed, if the crawl was stateful. 
 +  - **The engine's partitioning posture**: which browser and version, and whether third-party cookie or storage partitioning was on. In 2026 this is not a detail — see [[#Since 2022 the engine decides, not you]]. 
 + 
 +One sentence that does all of it: //"OpenWPM 0.35.0 (its pinned unbranded Firefox build), stateful with ''num_browsers=1'' and ''tp_cookies="always"'' (third-party cookies allowed, unpartitioned), visit order randomised with seed 20260819, profile dumped after each 1,000 sites and published."// 
 + 
 +===== Recommendations ===== 
 + 
 +  - **Default to stateless** unless your question needs accumulation. It parallelises, it is order-independent, and every visit is an independent observation, which is what the statistics on [[Statistics:Hypothesis testing]] assume. 
 +  - **Say so anyway.** Getting it by default is not the same as reporting it, and 75.4% of the crawling papers in this corpus did not. 
 +  - **If you need state, prefer seeded-stateless** to a rolling profile. You keep a non-empty starting state and lose the order confound. Publish the seed. 
 +  - **If you need a rolling profile, run one browser** or report how many you ran and how the site list was partitioned across them. 
 +  - **Never claim a reset you did not measure.** Run [[#The code|the probe]] against your own harness once; it takes a minute and it is the cheapest methodological insurance on this page. 
 +  - **Do not compare your numbers to a paper on the other side of this axis** without saying so. Third-party counts from a fresh-profile crawl and from an aged profile are different quantities. 
 +  - **State the engine's partitioning posture**, and if you disable partitioning to get cross-site accumulation, say that you did and why. 
 + 
 +===== Papers to read first ===== 
 + 
 +  - **{[englehardt2016online]} — the reference implementation of both modes.** Read §3.3 for the cost of statefulness and §4 for the seed-profile design and its artefact. Everything later argues with this paper. 
 +  - **{[zeber2020representativeness]} — how far a crawl is from a user.** The numbers you will be asked about in review. 
 +  - **{[demir2022_reproducibility]} — what to write down.** Criterion C11 and practice P9 are the reporting standard; the paper also measures how badly the field met it. 
 +  - **{[rasaii2025_crumbs]} — the modern stateful design, done well.** Split the list, accept on the first half, measure the second half, randomise the order. The clearest recent example of a result that a stateless crawl cannot produce. 
 +  - **{[urban2020beyond]} — seeded stateless, and why.** One sentence in §4.3.2 explains the whole third design position. 
 +  - **{[acar2014_never]} — why a clean profile is hard.** Respawning and syncing across a deliberate state clear. 
 +  - **{[agarwal2020_stop]} — train stateful, measure stateless.** The hybrid pattern most personalisation work now uses. 
 +  - **{[song2026_wfpllm]} — the 2026 version of the realism problem.** Models trained on scripted-crawler traffic score under 10% on real users; LLM-agent personas close most of the gap. 
 +  - **{[jueckstock2021_realistic]} — the neighbouring axis.** Vantage point and browser configuration, with every crawl launched from "a clean user profile". Often cited as varying statefulness; it does not. See [[Design:Crawling location]] for that axis. 
 + 
 +===== Open Questions ===== 
 + 
 +<WRAP todo> 
 +  * **Nobody has run the clean experiment.** Demir et al. announce one and do not deliver it: §2.2 says "Since the effects of C5 and C11 are not yet adequately discussed by previous work, we analyze them in Section 4", and §4 then runs "four exemplarily case studies focusing on C4, C5, C10, and C12" — repetition, crawler technology, interaction and geolocation. C11, the crawling strategy, is the one criterion they flagged and did not vary; their own runs are described in Appendix C as "stateless coordinated crawls" {[demir2022_reproducibility]}. Sixteen papers in this corpus run both arms, every one of them incidentally to another question. A same-sites, same-time, same-vantage crawl differing //only// in statefulness, reporting the effect on third-party counts, tracker counts and filter-list hit rates, would be a short and highly citable paper. 
 +  * **How much does visit order actually change a stateful result?** The confound is universally acknowledged and never quantified. 
 +  * **Does the seed profile artefact bite?** Englehardt and Narayanan predicted that cloning one seed into ''N'' browsers inflates cookie-sync counts. Nobody has measured the size of the inflation, and it is the design large stateful crawls have used since. 
 +  * **What does statefulness mean under partitioning?** If a stateful crawl's cross-site accumulation is the thing being measured, and every default browser now partitions storage while the research tooling either disables the partitioning (Playwright, OpenWPM — both verified above) or predates it entirely, then the stateful/stateless dichotomy needs a third dimension. No paper in the corpus addresses this, and the ground is still moving: Playwright's opt-out is expected to become unavailable when Chromium removes the flag, at which point every Playwright-based crawl changes behaviour without any change to the paper's own code. 
 +  * **Does the per-browser cookie-jar partition change published results?** Carried over from [[Programming:Crawler:OpenWPM]] because it is the same question: no paper we found reports ''num_browsers'' alongside a stateful claim. 
 +</WRAP> 
 +====== References ======
  
 <bibtex bibliography></bibtex> <bibtex bibliography></bibtex>
Line 101: Line 629:
 /* This enables discussion under this article. */ /* This enables discussion under this article. */
 ~~DISCUSSION~~ ~~DISCUSSION~~
 +
programming/stateful_stateless.1742307641.txt.gz · Last modified: by karelkubicek

Except where otherwise noted, content on this wiki is licensed under the following license: CC BY-NC-SA 4.0
CC BY-NC-SA 4.0 Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki