Closed Bug 1011092 Opened 11 years ago Closed 11 years ago

Firefox 29 fires DOMContentLoaded for unloaded tabs from previous session

Categories

(Firefox :: Session Restore, defect)

29 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: Lakatos.Isti, Unassigned)

Details

Attachments

(1 file)

1.90 KB, application/x-xpinstall
Details
Attached file test.xpi
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: I have an extension which listens for the DOMContentLoaded event of documents to do some processing. Sample code can be found in the test.xpi extension attached. Actual results: Starting with Firefox 29 tabs from previous sessions which have not loaded fire the DOMContentLoaded event, which leads to performance issues when many tabs are restored. Expected results: DOMContentLoaded should only be fired the active tab from each window.
Component: Untriaged → Session Restore
I had a little more time to look into it, apparently the DOMContentLoaded event is signaled from about:blank pages created for every tab.
Why is this a bug? about:blank is a document, it fires DOMContentLoaded. This is expected, as far as I can tell.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → INVALID
The problem is not that the about:blank fires DOMContentLoaded, the problem is that there are unnecessary about:blank pages created for every unloaded tab when Firefox restores a session
(In reply to Lakatos.Isti from comment #3) > The problem is not that the about:blank fires DOMContentLoaded, the problem > is that there are unnecessary about:blank pages created for every unloaded > tab when Firefox restores a session This is normal behaviour everywhere, including on the web, for creating a frame/browser to load content in. If you create an iframe it loads about:blank before doing anything else. Trivial testcase: http://jsbin.com/wasap/1/edit . (produces 'about:blank' in the console in both Firefox and Chrome)
Status: RESOLVED → VERIFIED
(that said, we've considered not actually creating browser frames for tabs which have no content loaded at that point, but because of how the current implementation of the tabbed browsing interface works, that is nontrivial, so it's not currently implemented)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: