I see that it’s an old question, but i faced this problem recently.
I’m using window.unload
and it works fine in ios browsers (although if you look at Apple documentation it seems to be deprecated and they recommend to use document.pagehide
)
More Related Contents:
- How to detect in iOS webapp when switching back to Safari from background?
- Is there an alternative method to use onbeforeunload in mobile safari?
- How do I correctly detect orientation change using Phonegap on iOS?
- Javascript for “Add to Home Screen” on iPhone?
- window.onbeforeunload not working on the iPad?
- Force link to open in mobile safari from a web app with javascript
- How to open a native iOS app from a web app
- iOS 8 removed “minimal-ui” viewport property, are there other “soft fullscreen” solutions?
- Fixed positioning in Mobile Safari
- Programmatically selecting text in an input field on iOS devices (mobile Safari)
- Copy to clipboard using Javascript in iOS
- Simplest way to detect a pinch
- Programmatically focus on next input field in mobile safari
- iScroll 4 not working with form element iPhone Safari and Android browser
- Invoke native date picker from web-app on iOS/Android
- Why can’t JavaScript .play() audio files on iPhone safari?
- Preventing default context menu on longpress / longclick in mobile Safari (iPad / iPhone)
- Strange behavior of select/dropdown’s onchange() JS event when using ‘Next’ on Mobile Safari Dropdown list item select box
- Difference between onbeforeunload and onunload
- Determine if user navigated from mobile Safari
- Available iPhone Web Application JavaScript UI Library/Frameworks
- Javascript date parsing on Iphone
- how to intercept Button click inside UIWebview on IOS?
- Facebook OAuth “Unsupported” in Chrome on iOS
- How to open Safari from a WebApp in iOS 7
- Detect if page is loaded inside WKWebView in JavaScript
- Is it possible, in JavaScript, to detect when the screen is turned off in the Android & iOS browsers
- How to implement an onmousedown and onmouseup on an iPhone touch screen
- How to show the “Are you sure you want to navigate away from this page?” when changes committed?
- Is Safari on iOS 6 caching $.ajax results?