-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replay): Send replay data when page is unloaded #6910
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
Conversation
This ties into the changes from here: #6859
That didn't seem to trigger for me in time - I tried the following on desktop:
Without this change, no request was even tried to be sent. With this change, I see a successful HTTP request in the network tab. |
size-limit report 📦
|
Moving our Slack conversation back to here... I'm wondering what the overlap between |
In my tests, pagehide was covered by visibility change, so I think it's fine to use only visibilitychange. Regarding bfcache, I just checked this in chrome, and it seems we are not eligible anyhow because of:
Which we'll always have when we try to send stuff before unloading somehow. |
But we wont have any inflight requests on unload since we have no listeners for unload? |
So we decided that we're OK with this data missing on moving away. Other cases like reloading the tab are handled via |
This ties into the changes from here: #6859
Currently, we only send replay data on blur. However, we should also listen to beforeunload, which is called when the page is closed.