-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Immediately detach the old UI when the browser tab is closed or refreshed #6293
Comments
Now with Flow 3.0 and Vaadin 15, the needed API is available in all the supported browsers as IE11 and Safari 11 are not supported anymore. This means that there is no real blockers for implementing the API for Java driven UIs (15+). For Vaadin 14, this could be maybe considered backported as an "experimental" feature that can be enabled. Not sure if there is any trouble for users if UIs are cleaned up eagerly for some browsers, but not all. |
We've implemented a Beacon handler as part of Collaboration Engine. It would be great if it could be moved over to the core framework instead. |
Is it possible to distinguish between closing a tab or refreshing it via the Beacon handler? |
Started drafting this feature in #16657 |
No. The trigger for sending a Beacon request is the |
Notifies server about closed UIs using a beacon request on pagehide event. At the same time unifies behaviour in certain edge cases, where Safari maintained the state when brought back from page cache. Previously Safari in some situations kept the state. Tested manually with Safari, Chrome, Firefox and validated results using VisualVM. Closes #6293
Notifies server about closed UIs using a beacon request on pagehide event. At the same time unifies behaviour in certain edge cases, where Safari maintained the state when brought back from page cache. Previously Safari in some situations kept the state. Tested manually with Safari, Chrome, Firefox and validated results using VisualVM. Closes #6293
Notifies server about closed UIs using a beacon request on pagehide event. At the same time unifies behaviour in certain edge cases, where Safari maintained the state when brought back from page cache. Previously Safari in some situations kept the state. Tested manually with Safari, Chrome, Firefox and validated results using VisualVM. Closes #6293
Notifies server about closed UIs using a beacon request on pagehide event. At the same time unifies behaviour in certain edge cases, where Safari maintained the state when brought back from page cache. Previously Safari in some situations kept the state. Tested manually with Safari, Chrome, Firefox and validated results using VisualVM. Closes #6293 Co-authored-by: Matti Tahvonen <matti@vaadin.com>
* feat: More eager cleanup for UIs using Beacon API (#16657) Notifies server about closed UIs using a beacon request on pagehide event. At the same time unifies behaviour in certain edge cases, where Safari maintained the state when brought back from page cache. Previously Safari in some situations kept the state. Tested manually with Safari, Chrome, Firefox and validated results using VisualVM. Closes #6293 * chore: updated test to run with older selenium API * chore: clean up * chore: fixed window index in IT --------- Co-authored-by: Matti Tahvonen <matti@vaadin.com>
This feature seems to work in every browser at the moment, except Firefox. Any suggestions what could cause this issue? Using Vaadin 24.3 Tested browsers:
|
Could be related to #19305 (comment) |
The Beacon API is now relatively widely available, making it possible to propagate an unload event to the server when a tab is closed/refresh without affecting user experience.
This could be used to close UIs on close/refresh immediately, without waiting for expiration due to missed heartbeats. This has the potential to improve performance, primarily by decreasing memory consumption.
The heartbeat expiration or similar is still needed for when the unload event can not be propagated to the server, e.g. when the user loses network connectivity.
The text was updated successfully, but these errors were encountered: