Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Mozilla Hacks 6 min read Deep dive mediumAdept

Improving the Storage Access API in Firefox

Ahead of enabling State Partitioning for all users, Firefox is changing its Storage Access API implementation in four ways. Automatic storage grants now require recent user interaction with the third party, and accepted prompts or iframe interactions count as interaction. Permissions are scoped to the Site rather than the origin, which fixes login flows that move across subdomains. Interaction rules are tightened: denying a prompt clears the interaction, accepting resets its timer, and a reload requires new interaction. When third-party cookies are blocked, requestStorageAccess always rejects and hasStorageAccess returns false starting in Firefox 98.

Assumes: browser cookies and third-party storageiframesJavaScript promises

Related posts

  • The File System API with Origin Private File System

    WebKit mediumAdept

    WebKit now supports the File System Standard's origin private file system, a per-origin sandboxed storage area where web apps can create, read, write, move, enumerate and delete files and directories. It is available from Safari on macOS 12.2 and iOS 15.2, has the same lifetime as IndexedDB and localStorage, and is disabled in Private Browsing. Worked examples cover navigator.storage.getDirectory(), getFileHandle/getDirectoryHandle, move(), resolve(), async iteration, removeEntry() and getFile(). Writing in WebKit currently requires FileSystemSyncAccessHandle, which works only in Workers, takes exclusive access to a file, and offers synchronous read, write, truncate and flush for the best performance.

  • Private Browsing 2.0

    WebKit mediumAdept

    Safari 17.0–17.5 extends Private Browsing well beyond ephemeral storage, adding link tracking protection that strips known click-level tracking query parameters before navigation and hides URL query strings, fragments and cross-site referrers from third-party scripts. Other additions include blocking network loads to trackers flagged by both DuckDuckGo and EasyPrivacy (including CNAME- and IP-cloaked ones), Oblivious DNS over HTTPS, proxying of unencrypted HTTP, per-tab iCloud Private Relay sessions, and extensions with site access off by default. For fingerprinting, the approach is to make fingerprints unique per website and regenerate them on every fresh start, using multi-hop proxies, fewer fingerprintable APIs and small noise injection. Partitioned SessionStorage and blob URLs ship in all modes, Web AdAttributionKit keeps tab-scoped attribution working, and users can reload a site with reduced protections if it breaks.

  • Building Profiles with new WebKit API

    WebKit mediumAdept

    macOS 14 and iOS 17 add WebKit APIs for creating multiple persistent WKWebsiteDataStore instances, each keyed by a UUID, so apps can build browser-style profiles with separate cookies and website data. Assign a store to a WKWebView through its configuration, remove it with WKWebsiteDataStore.remove(forIdentifier:), which can fail if the store is in use or the file system errors, and list existing stores via allDataStoreIdentifiers to avoid creating one by accident. App-owned data such as bookmarks, history and per-site settings still has to be separated per profile by the client.

  • In March, we see Firefox 87

    Mozilla Hacks mediumAdept

    Firefox 87 enables the beforeinput event and InputEvent.getTargetRanges() by default, letting web apps inspect and cancel text edits in inputs and contenteditable elements before the DOM changes, with an example that protects metadata spans inside an editable comment. DevTools gains prefers-color-scheme light/dark emulation and a :target pseudo-class toggle. The default Referrer-Policy becomes strict-origin-when-cross-origin, so paths and query strings are no longer sent cross-origin. SmartBlock substitutes bundled stand-ins for blocked tracking scripts so sites keep working, and VoiceOver screen reader support now ships on macOS.

  • Hopping on Firefox 91

    Mozilla Hacks mediumAdept

    Firefox 91 enables the Visual Viewport API by default, making it available in all major browsers and letting pages read the visible viewport's size, offset and scale and react to resize and scroll events, such as when zooming or an on-screen keyboard appears. Intl.DateTimeFormat gains new timeZoneName options (shortOffset, longOffset, shortGeneric, longGeneric) plus formatRange() and formatRangeToParts() for localized date ranges, all shown with code examples. The Gamepad API is now restricted to secure contexts and gated by a gamepad Feature Policy. Private browsing windows also adopt an HTTPS-first policy that falls back to HTTP when a site lacks HTTPS.

The quest for software engineering knowledge.

Look:
Layout: