Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

BFCache is ineligible when websocket connection is closed on snapshoted version

17 views
Skip to first unread message

Szczepan Bielecki (Pimko)

unread,
Aug 9, 2024, 2:25:22 AM8/9/24
to bfcache-dev
Hello there,

Like in the title, I created a simple example of how we can test that issue.

Here we have an example when open connection on pageshow event and then close it on pagehide event:
https://bf-cache-websocket.glitch.me/websocket.html

How to test step by step:
  1. Load page and open DevTools -> Application -> Back/forward cache,
  2. Click "Test back/forward cache",
  3. You receive site from bfcache with success,
  4. Click "Test back/forward cache" again,
  5. You receive site from navigation with error for bfcache which cause by websocket open connection.

When we check the example from web.dev with IndexedDB open and close connection it works properly (https://bf-cache-websocket.glitch.me/indexedDB.html) .

You can check the source code in html to check how open and close connection are done.

Do you have some ideas about what is the issue?

Reply all
Reply to author
Forward
0 new messages