Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check CSS and JS loading order #647

Closed
macbre opened this issue Jul 1, 2016 · 1 comment
Closed

Check CSS and JS loading order #647

macbre opened this issue Jul 1, 2016 · 1 comment

Comments

@macbre
Copy link
Owner

macbre commented Jul 1, 2016

From Google Chrome "Web Page Performance" audits:

  • The following external CSS files were included after an external JavaScript file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript.
  • 1 inline script block was found in the head between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource.

See #487 for critical path handling

Suggested order in <head> tag:

  1. inline JS
  2. external CSS
  3. external JS
@macbre macbre added this to the Roadmap milestone Jul 1, 2016
@macbre macbre modified the milestones: Roadmap, v1.17 Jul 10, 2016
@gmetais
Copy link
Contributor

gmetais commented Sep 18, 2016

Hi @macbre,

I think these parallel download issues do not longer exist in modern browsers:
https://stackoverflow.com/questions/9271276/is-the-recommendation-to-include-css-before-javascript-invalid#answer-9272629

Browsers have 2 parsers, a fast parser that reads the entire DOM looking for external scripts/stylesheets/images to load, and a DOM parser that actually reads the HTML and renders or executes.

For me, the main issue is non-async third party content in the critical path.

@macbre macbre modified the milestones: v1.17, Roadmap Sep 21, 2016
@macbre macbre modified the milestones: v1.20, Roadmap May 22, 2017
@macbre macbre closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants