IndexedDB and Inactive Document Invalidation Signals API

6 views
Skip to first unread message

Mingyu Lei

unread,
Feb 20, 2023, 12:29:48 AM2/20/23
to stora...@chromium.org, chrome-bfcache
Hi Storage Devs,

TL;DR:
We want to modify the IndexedDB code to support the invalidation signals API. Please help to review the corresponding section in our design proposal.

Background:
BFCache team is planning to build a set of invalidation signals APIs that allow the site owner to specify some "invalidation signals" via JavaScript, and the page will be prevented from entering (or invalidated if the page is already in) some inactive states like prerendering and BFCache, if any of the signals is modified.

An example use case would be: assuming the site is using IndexedDB to store some credentials that mark the user's login status, and the page is currently frozen in BFCache. If the user performs logout from another tab, resulting in the changes to the IndexedDB, then the BFCached page should be evicted.

For the detailed information, please refer to the explainer.

Proposal:
We planned to maintain an IDB observer per connection that receives changes to certain object stores, and manipulate the inactive document states accordingly. The object stores to be observed will be set up in the first transaction after the page invokes the invalidation signal APIs.

More implementation details and design concerns can be found from this section in the design doc.

Thanks a lot for the feedback in advance!

Mingyu

Mingyu Lei

unread,
Feb 27, 2023, 9:48:46 PM2/27/23
to stora...@chromium.org, chrome-bfcache
Bumping this thread in case anyone from the storage-dev team missed it during the US holiday last week. 
Reply all
Reply to author
Forward
0 new messages