yui/yui3 — pull request #965 by rgrove (2013-07-03 22:28:28+00:00)
Title: Don't break the back/forward cache. Fixes #959

Attaching an unload listener breaks the back/forward cache in modern browsers, and is only necessary in old versions of IE that can leak memory across pageviews if events aren't detached.

This change limits the unload listener to IE6 and below. I'm not aware of any need for it in newer IEs, but if anyone knows differently, please speak up.

All unit tests pass, but this PR probably needs manual testing on some real-world use cases to make sure unbreaking the back/forward cache doesn't violate assumptions YUI developers have been making. I'll test it at SmugMug and report back with insight. If others could test as well, that'd be much appreciated.