Closed Bug 615466 Opened 15 years ago Closed 6 years ago

improve performance by delaying the loading of print style sheets

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1386840

People

(Reporter: asa, Assigned: bzbarsky)

References

()

Details

We should delay the loading of print style sheets or other media queries that don't apply to the screen medium.
alternate summary: "Performance: postpone loading of style sheets non-applicable to the current device mode/media" (from email discussion) Tantek said: Agreed, we could easily postpone loading of stylesheets with explicit media attributes that don't apply to the current device (e.g. media="print" style sheet on an interactive device) until after loads that may be used to render the current device. Boris said: This might not be a bad idea; we can handle it similarly to the way we handle alternate stylesheets. Shouldn't be that hard to do that for media queries that don't apply to the screen medium. Bug not on file yet, right? Tantek said: * if a script changes the media attribute of such a style sheet (e.g. from "print" to "screen"), expecting that the style sheet is already loaded Boris said: What do other browsers do here? If they don't block scripts on alternate-media sheets, then there's no problem. But yes, this is a (minor) worry. Tantek said: if a script attempts to access the Style Sheet object model of such style sheet and it hasn't loaded yet. Boris said: This is a general problem; you can always race setTimeout against loading stylesheets, right? Gecko throws an exception if script tries to do this. We've had very few reports of resulting issues. I think as long as we block onload for the sheet we should be ok, more or less. At least the jquery ready() issues have been somewhat sorted out by the fact that it can fire before our normal screen sheets have loaded too.
Assignee: nobody → bzbarsky
Priority: -- → P2
Moving to p3 because no activity for at least 1 year(s). See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3

Emilio fixed this in bug 1386840, like so many other things I've been letting languish. ;)

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.