Closed
Bug 407125
Opened 17 years ago
Closed 5 years ago
pagehide fires for unloads in iframes not prompted by user navigation
Categories
(Developer Documentation Graveyard :: HTML, defect)
Developer Documentation Graveyard
HTML
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: myk, Unassigned)
References
()
Details
According to
http://developer.mozilla.org/en/docs/Using_Firefox_1.5_caching#pagehide_event :
"If you want to define behavior that occurs [when] *the user* navigates away
from the page... you can use the new pagehide event."
And also:
"If the page contains frames, then when the cached page is loaded... When *the
user* navigates away from the cached page, the pagehide event from each frame
fires before the pagehide event in the main document."
(emphases mine)
But loading netscape.aol.com fires 9-11 pagehide events for
http://netscape.aol.com/ads/load.htm , and reloading it fires a page hide event for
http://netscape.aol.com/ (as expected), one each for
http://netscape.aol.com/ads/load_v4.adp and
http://cdn.atwola.com/_media/uac/tcode.html , and another 9-11 for
http://netscape.aol.com/ads/load.htm .
There aren't any iframes in the HTML file, but there are two in the DOM of the
loaded document, so I suspect these pagehides are happening as the page reuses
an iframe to load multiple pieces of content. Based on the description of pagehide on MDC, this shouldn't be happening and probably hurts performance besides contributing to bugs like bug 407116.
Comment 1•17 years ago
|
||
Shouldn't the pagehide listeners be checking the event's target? Seems like we should just change the documentation on MDC...
Component: XUL Widgets → DOM
Product: Toolkit → Core
QA Contact: xul.widgets → general
Reporter | ||
Comment 2•17 years ago
|
||
(In reply to comment #1)
> Shouldn't the pagehide listeners be checking the event's target? Seems like we
> should just change the documentation on MDC...
We could do that, but is the current behavior really the intended (and useful) behavior?
Comment 3•17 years ago
|
||
Perhaps not most useful, but it certainly is intended.
![]() |
||
Comment 4•17 years ago
|
||
The documentation is just wrong. pagehide/pageshow fire whenever unload/load would have fired before bfcache existed. Nothing to do with users at all, everything to do with loads.
![]() |
||
Updated•17 years ago
|
Assignee: nobody → web.developer
Component: DOM → Web Developer
Keywords: perf
Product: Core → Documentation
QA Contact: general
![]() |
||
Updated•17 years ago
|
Keywords: dev-doc-needed
Updated•10 years ago
|
Assignee: web.developer → nobody
Component: Web Developer → Mozilla Platform
Product: Documentation → Developer Documentation
Comment 5•6 years ago
|
||
The MDN team is no longer actively working on Mozilla Platform docs. Volunteer contributions are welcome.
Priority: -- → P5
![]() |
||
Comment 6•6 years ago
|
||
This was in the wrong component, as far as I can tell. This event is part of the HTML standard.
Component: Mozilla Platform → HTML
Priority: P5 → --
Comment 7•5 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Updated•5 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•