You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unknown/ N/A as this is being detected from end-user side
Detailed Problem Description
Database SDK's WebSocket connection doesn't consistently close when a page becomes hidden (visibilitychange or pagehide), preventing Chrome from using Back/Forward Cache (bfcache). This forces full reloads, degrading the user experience.
To improve bfcache compatibility, the SDK could close the WebSocket connection within the pagehide event (or when visibilitychange state is hidden).
I'm not sure, but I think this could be addressed in PersistentConnection by modifying the onVisible_ to call close() when visibility becomes hidden, and ensuring shouldReconnect_ prevents immediate reconnection when the page is not visible.
Operating System
macOS 15.3.1
Environment (if applicable)
Chrome 134.0.6998.89
Firebase SDK Version
v4.12.1
Firebase SDK Product(s)
Database
Project Tooling
Unknown/ N/A as this is being detected from end-user side
Detailed Problem Description
Database SDK's WebSocket connection doesn't consistently close when a page becomes hidden (
visibilitychange
orpagehide
), preventing Chrome from using Back/Forward Cache (bfcache). This forces full reloads, degrading the user experience.To improve bfcache compatibility, the SDK could close the WebSocket connection within the
pagehide
event (or whenvisibilitychange
state ishidden
).I'm not sure, but I think this could be addressed in
PersistentConnection
by modifying theonVisible_
to callclose()
when visibility becomes hidden, and ensuringshouldReconnect_
prevents immediate reconnection when the page is not visible.Steps and code to reproduce issue
The text was updated successfully, but these errors were encountered: