Open Bug 1520328 Opened 3 years ago Updated 15 days ago

FOUC caused by a hidden input in the <head> tag

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

Webcompat Priority ?
Tracking Status
firefox66 --- affected

People

(Reporter: twisniewski, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file test.html

It appears that in the attached test-case, a FOUC (flash of unstyled content) is being caused by the <input type=hidden> in the <head> of the document. The delay is more noticeable if the stylesheet takes longer to download, but doesn't seem to be tied to the specific stylesheet I've used in the test-case (I tried a stylesheet from the BBC site, among others, and they all caused a flash relative to the time it took to fetch the remote CSS file).

Well, the <input> causes the <head> to end and the <body> to begin, so the <link> after that is in the body, which doesn't block layout IIRC.

Boris, do you have any opinion on what to do about this? You were involved in the discussion in:

https://groups.google.com/a/chromium.org/d/msg/blink-dev/QC5iefctcag/kkoBNliBAgAJ

Which seems relevant to this and looks like it'd regress this in Chromium.

Flags: needinfo?(bzbarsky)

Yes to all of comment 1.

Note that <input> is not allowed in <head> in valid HTML, by the way, not that anyone really cares about HTML validity...

Boris, do you have any opinion on what to do about this?

Is this being a problem on real-world sites?

Flags: needinfo?(bzbarsky)

OK, so specifically this has been seen on https://watchmyparcel.com/hm only (the other link in that issue does not have this pattern).

Priority: -- → P3
Webcompat Priority: --- → ?
You need to log in before you can comment on or make changes to this bug.