Opened 14 years ago
Closed 13 years ago
#3567 closed defect (fixed)
addOnUnload events fire on windowon.unload at which time which Firefox is unstable
Reported by: | sjmiles | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Core | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
At window.onunload time Firefox appears to be at an odd state, some objects are not accessible from some scopes, and Firebug is confused.
window.onbeforeunload seems more reliable. IE still needs to use onunload because it has it's own issues which are documented inline in hostenv_browser.js.
It's potentially confusing to have addOnUnload really do addOnBeforeUnload on some browsers, but I'm not sure users care. If you just want to "do something at the end" it should be ok. If you really want one of the specific events, you can connect directly.
Change History (8)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 14 years ago by
Milestone: | 0.9beta → 0.9 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
This page seems to indicate that caching will be disabled if there is a window.onbeforeunload handler: http://ajaxian.com/archives/newsvine-live-evergreen-is-forever
It may just mean the in-memory cache is not used (for things like fast back rendering), but some references on the web seem to indicate that it also affects the normal browser cache.
I'm going to reopen for 0.9, so that we can verify if it has an effect on caching. I'll assign the bug to me (at least the part about checking the affect on the cache).
comment:4 Changed 14 years ago by
Owner: | changed from sjmiles to James Burke |
---|---|
Status: | reopened → new |
comment:5 Changed 13 years ago by
Milestone: | 0.9 → 1.0 |
---|
Talked with Alex about it. He thought it just affected the "fastback" back button cache. I'll push to 1.0 and follow up with sjmiles on the motivation for this change.
comment:6 Changed 13 years ago by
This page the bfcache is affected by any type of unload registration:
http://developer.mozilla.org/en/docs/Using_Firefox_1.5_caching
comment:7 Changed 13 years ago by
Milestone: | 1.0 → 1.1 |
---|
comment:8 Changed 13 years ago by
Milestone: | 1.1 → 0.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
It seems this is only affects the back/forward cache and not the normal cache, given the info above, so re-closing this ticket.
(In [9367]) Change addOnUnload events to fire at window.onbeforeunload (except on IE), refs #3567.