ITADN

WebSocket BFCache integration (Disconnect on entry)

#648Openllannasatoll 创建于 2026-04-13
L
llannasatollcommented
### WebKittens @annevk ### Title of the proposal Unblock BFCache for pages with active WebSockets by disconnecting on entry. ### URL to the spec https://github.com/whatwg/html/pull/12349 (Draft) ### URL to the spec's repository https://github.com/whatwg/html ### Issue Tracker URL _No response_ ### Explainer URL _No response_ ### TAG Design Review URL _No response_ ### Mozilla standards-positions issue URL _No response_ ### WebKit Bugzilla URL _No response_ ### Radar URL _No response_ ### Description This proposal is being discussed in https://github.com/whatwg/html/issues/12085. Currently, the HTML specification defines active WebSocket connections as a reason to block a page from entering the Back/Forward Cache (BFCache). We propose to allow these pages to be cached by closing any active WebSocket connections upon BFCache entry. This aligns with WebKit's current behavior; we observe that Safari already allows pages with active WebSockets to enter the BFCache by closing the connections upon entry and allowing the page to be restored.
0 条评论