Re: [w3c/IndexedDB] How should IDB connections and outstanding IDB transactions behave when a page enters back/forward cache? (Issue #381)

Here is a brief summary of what has been recently implemented in Chrome.

Pages with open IndexedDB connections or transactions can be eligible for BFCache, but they may be evicted under certain conditions, including:
1. When another page attempts to create an IndexedDB connection with a higher version, which would require the BFCached page to respond to a `versionchange` event. In this case, the `versionchange` event is not sent to the (to be evicted) BFCached page.
2. If the BFCached page has created an IndexedDB transaction but it has not yet started, which may be caused by waiting for locks held by other transactions.
3. If the BFCached page has an open transaction that is holding locks and other transactions from other pages are still waiting for those locks.
4. If the cached page has an open transaction, and a new transaction created by another page is attempting to acquire some of the locks held by the BFCached page's transaction.

Some WPTs had been added under the [wpt/IndexedDB folder](https://github.com/web-platform-tests/wpt/tree/master/IndexedDB), here are the original changes for references:
- [Add WPT for BFCache eligibility with open IndexedDB connection](https://crrev.com/c/3985294)
- [Add WPT for BFCache eviction after version change event](https://crrev.com/c/4060130)
- [Add WPT for BFCache eligibility with open IndexedDB transaction](https://crrev.com/c/4060378)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/381#issuecomment-1378430869
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/issues/381/1378430869@github.com>

Received on Wednesday, 11 January 2023 09:03:26 UTC