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

[5.6] Improving asset loading #23479

Merged
merged 2 commits into from
Mar 12, 2018
Merged

[5.6] Improving asset loading #23479

merged 2 commits into from
Mar 12, 2018

Conversation

votemike
Copy link
Contributor

@votemike votemike commented Mar 10, 2018

The fonts requested via the Google stylesheet take time to load and a fair amount of time to lookup the DNS. So prefetch the DNS for the font files.
The Google Stylesheet doesn't start downloading until it's @import is discovered in app.css (see laravel/laravel#4603). Moving it to the HTML will make it load sooner. (Another option would just be to preload the Google Stylesheet from the HTML and leave the CSS reference in app.css)
The Javascript should be placed higher so that it is discovered soon and can be downloaded as soon as the HTML parser finds it. If this Javascript is not critical to the page, we should add the defer attribute should be used instead of moving the tag to the bottom of the page.

@GrahamCampbell GrahamCampbell changed the title Improving asset loading [5.6]Improving asset loading Mar 10, 2018
@GrahamCampbell GrahamCampbell changed the title [5.6]Improving asset loading [5.6] Improving asset loading Mar 10, 2018
@franzliedke
Copy link
Contributor

👍 for defer

@tillkruss
Copy link
Collaborator

Yes, defer please.

@taylorotwell taylorotwell merged commit eca22c8 into laravel:5.6 Mar 12, 2018
@votemike votemike deleted the h2-upgrades branch March 12, 2018 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants