All Questions
Tagged with visibilitychange page-lifecycle
3
questions
0
votes
0
answers
28
views
How much time do I have to save data to local storage when browser visibility changes to hidden?
I want to save page data to local storage upon tab close or reload. I am saving data upon visibilitychange event to hidden. I've read this is the recommended way to do so per Page Lifecycle API and ...
6
votes
1
answer
2k
views
`visibilitychange` firing as "hidden" and not "visible" for new window initial load
I am launching a new tab and trying to add a visibilitychange handler for the window in order to add unload behavior, since all the docs recommend that over onunload and pagehide. My plan was to ...
2
votes
0
answers
3k
views
Why is my fetch keepalive call on page unload failing in Safari?
I need to send back a bit of data for reporting when the user closes or leaves a specific page. So I set up an API endpoint and am using window.fetch with the keepalive flag set to make sure that the ...