Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use pageshow/pagehide instead of load/unload
Browsers that use a page cache may not always fire onunload when a user navigates away from a page but doesn't close the window. They fire the pagehide event instead, and the pageshow event when the user returns to the page. It's better for us to use these events on browsers that support it. pageshow/pagehide also fire when onload/unload would normally have fired. Thanks to github user @solstice for the info in issue 43: YahooArchive#43 and the Surfin Safari blog: http://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
- Loading branch information