{
  "slug": "playwright-page-localstorage-and-page-sessionstorage-read-and-write-origin-stora-fad96a56018a",
  "title": "Playwright page.localStorage and page.sessionStorage read and write origin storage",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-15T10:05:19.000Z",
  "announced_at": "2026-06-15T10:05:19.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When testing storage for a page’s current origin, use `page.localStorage` or `page.sessionStorage` to set, retrieve, or list items. Navigate the page to the target origin first.",
    "examples": [
      "await page.goto('<origin-url>');\nawait page.localStorage.setItem('token', 'abc');\nconst token = await page.localStorage.getItem('token');\nconst items = await page.sessionStorage.items();"
    ],
    "gotchas": [
      "Version: v1.61.0",
      "name (required): Storage item name for `getItem` and `setItem`.",
      "value (required): New string value for `setItem`; overwrites the existing value for that name.",
      "Prerequisite: Use Playwright v1.61 or later; these WebStorage methods were added in v1.61. Navigate the page to the target origin before accessing its storage.",
      "Applies to the page's storage for the current origin."
    ]
  },
  "why_it_matters": "Set up or inspect browser storage while testing a page for its current origin.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.61.0",
    "https://playwright.dev/docs/api/class-webstorage"
  ],
  "rank": 0.99054,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-3081afb6e04abdfe-1:gate",
    "evidence_hash": "dbcfef8a253ec929beeebe114951631317990b1153dd7838e6ec906812e39e91"
  },
  "review": {
    "draft_hash": "57d62afc9f0fea31621a7da0c595d0fe51ef8ac2fc055a59275da37e82381a7c",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.99 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
