gsklee / ngStorage

localStorage and sessionStorage done right for AngularJS.
MIT License
2.34k stars 461 forks source link

Implemet a workaround for IOS Devices with an older WebKit, which is not firing beforeunload #254

Open babubabu opened 7 years ago

babubabu commented 7 years ago

Additionally listen to the event 'pagehide', which is fired by older WebKit browsers instead of 'beforeunload'. The event listener for 'pagehide' does the same ("$storage.apply()") as the listener for 'beforeunload'

Regards, Babu