Open
Bug 1373694
Opened 7 years ago
Updated 2 years ago
Don't block on beforeunload events from third-party tracking domain scripts
Categories
(Core :: DOM: Events, enhancement, P3)
Core
DOM: Events
Tracking
()
NEW
Performance Impact | low |
People
(Reporter: mconley, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: perf)
Here's a profile where the parent process had to message the child to run beforeunload (and check if the unload should be cancelled) because a beforeunload event handler had been set in a tracking script from edgekey.net:
https://perf-html.io/public/38e1e8bd485695eac865c9f3dfc863128d87a514/calltree/?implementation=js&invertCallstack&range=3.8243_4.0831&thread=5
We're already doing work to throttle down setTimeouts in tracking scripts... can we also not have the parent message the content process if the beforeunload event handlers are being set from a tracking domain script?
We'll still run the beforeunload event handlers, but we won't _block_ the tab closing on it. What I'm suggesting here is that we make it so that tracking domain scripts cannot block tabs or windows from closing.
Reporter | ||
Updated•7 years ago
|
Blocks: photon-performance-triage
Whiteboard: [qf][photon-performance]
Updated•7 years ago
|
Whiteboard: [qf][photon-performance] → [qf][photon-performance] [triage]
Comment 1•7 years ago
|
||
I don't understand what running the handler without blocking tab closing on it means. Can you please elaborate?
The last sentence of comment 0 seems to break web pages. Note that tracking scripts can come from highly popular sites like Facebook or Twitter!
Comment 2•7 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog) from comment #1)
> I don't understand what running the handler without blocking tab closing on
> it means. Can you please elaborate?
From my understanding it means letting the web page do a sync XHR before we remove it from memory, but make the tab close immediately in the UI without offering an opportunity to show a confirm prompt.
Updated•7 years ago
|
Flags: qe-verify-
Priority: -- → P2
Whiteboard: [qf][photon-performance] [triage] → [qf][photon-performance]
Reporter | ||
Updated•7 years ago
|
Summary: Don't block on beforeunload events from tracking domain scripts → Don't block on beforeunload events from third-party tracking domain scripts
Updated•7 years ago
|
Whiteboard: [qf][photon-performance] → [qf:p3][photon-performance]
Updated•7 years ago
|
Priority: P2 → P3
Whiteboard: [qf:p3][photon-performance] → [qf:p3][reserve-photon-performance]
Updated•7 years ago
|
Priority: P3 → P4
Comment 3•7 years ago
|
||
Hi Marco, we don't use P4 for DOM bugs. We use P3 (backlog) and P5 (not plan to fix it but happy to take a patch). Do you think we could remap your P4 into either of them? Thank you.
Flags: needinfo?(mmucci)
Updated•7 years ago
|
Flags: needinfo?(mmucci)
Whiteboard: [qf:p3][reserve-photon-performance] → [qf:p3]
Updated•7 years ago
|
Priority: P4 → P3
Updated•3 years ago
|
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•