Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Unstyled content flashes on homepage #3407

Closed
johngruen opened this issue Aug 25, 2017 · 3 comments
Closed

Unstyled content flashes on homepage #3407

johngruen opened this issue Aug 25, 2017 · 3 comments
Assignees
Labels

Comments

@johngruen
Copy link
Contributor

Will try to grab a recording, but basically css gets passed in after content :(

@johngruen johngruen added the P1 label Aug 25, 2017
@johngruen johngruen added this to the General Release 55 milestone Aug 25, 2017
@johngruen johngruen added the perf Performance-related label Aug 25, 2017
@jaredhirsch jaredhirsch self-assigned this Aug 31, 2017
@jaredhirsch
Copy link
Member

Here's a screencast of the issue:

fouc-3407

I bet moving the CSS above the ~700kb of JS would help

jaredhirsch added a commit that referenced this issue Aug 31, 2017
If this doesn't work, we can try inlining CSS or hiding content till CSS
is ready
@jaredhirsch
Copy link
Member

Might need to move the homepage CSS above the GA and Raven snippets for this approach to work. It looks like those scripts (small yellow blocks) get loaded before the first paint (green block), but the big homepage JS (long yellow block) doesn't:

screen shot 2017-08-31 at 9 29 58 am

The first attempt PR moves the homepage CSS just above the homepage JS, so it might (hopefully will) get loaded before the first paint. I'll try on a low-spec machine once this hits stage, too.

Other approaches might include delaying rendering until the CSS loads, or inlining some/all of the homepage CSS. Hopefully this tweak will be good enough.

@jaredhirsch
Copy link
Member

Looks like this is actually a Nightly bug. See the discussion on dev-platform: https://groups.google.com/d/topic/mozilla.dev.platform/uN4idW92CCQ/discussion

Indeed, I cannot reproduce this bug on Chrome.

Probably still good to load CSS earlier, if only to improve perception among Nightly users.

@johngruen johngruen added P3 and removed P1 perf Performance-related labels Sep 1, 2017
@ianb ianb closed this as completed in c25b919 Sep 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants