#8 ✓resolved
Stephen Elson

events.js attaches 'unload' in all browsers, breaking Firefox/Safari/Opera bfcache

Reported by Stephen Elson | July 17th, 2009 @ 01:21 PM | in 1.6

Firefox 1.5+, Safari 3/4 (probably 2.0 too), and Opera have a back-forward cache that is disabled if an unload event is attached. Navigating back/forward is slower without the cache.

This should probably run IE-only, or IE-only and FF2 only:

r.addListener(window, "unload", clearEvents);

I don't think it's necessary in IE8 (when run in IE8 mode? or both IE8/IE7 mode?), because the garbage collector should work there.

At least some versions of Firefox 2 have an unrelated bug where events must be cleaned up:

http://dev.jquery.com/ticket/1911 - "it appears the events are being retained on page unload and that is causing the issues."

Originally reported by ludios@github

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A JavaScript Library

Shared Ticket Bins

Tags

Referenced by

Pages