v145 · Web APIs · Memory Context Guide

Memory Context Guide

What counts as an in-memory context, how storage APIs behave in each, and which IndexedDB backend Chrome 145 uses for each context type.

context types and backends

Context type Example IDB backend (Chrome 145) Persistence
Normal browsing Regular tab LevelDB (unchanged) Persists until explicitly cleared
Incognito / private mode Incognito tab SQLite (new in Chrome 145) Cleared when all incognito windows close
Opaque origin Sandboxed <iframe sandbox>, data: URL SQLite (new in Chrome 145) Cleared on navigation
Storage partition Cross-site iframe (3PCD) SQLite (new in Chrome 145) Partitioned; cleared with normal storage

what is an opaque origin?

// Opaque origins are assigned to:
// 1. Sandboxed iframes without 'allow-same-origin':
//    <iframe sandbox src="..."> — each load gets a fresh opaque origin
//
// 2. data: URLs:
//    window.open('data:text/html,...') — opaque origin, storage cleared on close
//
// 3. blob: URLs from a different origin:
//    URL.createObjectURL(blob) in a cross-origin context

// In all cases: IndexedDB is available, but backed by in-memory SQLite.
// Data does not persist across navigations.

// Check if your iframe is opaque:
const isOpaque = window.location.origin === 'null';
console.log('Opaque origin:', isOpaque);

storage API behaviour in in-memory contexts

API Available in incognito? Notes
indexedDB Yes SQLite backend in Chrome 145+. Cleared when incognito session ends.
localStorage Yes In-memory only; cleared when all incognito windows close.
sessionStorage Yes Tab-scoped as usual.
caches (Cache API) Yes Cleared at incognito session end.
Cookies Yes Ephemeral; not shared with normal mode.

see also

scenario focus

Select a scenario to focus its rendered example and summary.