Javascript unload event in Safari mobile?

I am working on webapp for iPad with jQtouch and jQuery. Webapp is used in the store and is viewed through the AVD view, which sends me email alerts when the device is shaking or disconnected from the power. However, I also want to know when the webapp was closed. I tried using $ (window) .bind ('unload', function () {}); but it doesn’t work either in Safari Mobile or when watching AVD. How can I make it work?

+3
source share
1 answer

I have an answer. This is not what we hoped for.

Technical definition of uploading from http://www.w3.org/TR/DOM-Level-2-Events/events.html :

The unload event occurs when the DOM implementation removes a document from a window or frame. This event is valid for BODY and FRAMESET elements.

I also received a response from some of the well-known at Apple: “Unfortunately, I could not find an event that fires when you click the Home button! I think that the most suitable event for this could be a page. This event really fires in Safari on iOS when you switch to the tab view to open a new page, but not when you click on the home screen icon :-( "

+5
source

Source: https://habr.com/ru/post/1781856/


All Articles