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

Script element section #26

Open
fvsch opened this issue Apr 22, 2016 · 7 comments
Open

Script element section #26

fvsch opened this issue Apr 22, 2016 · 7 comments

Comments

@fvsch
Copy link
Contributor

fvsch commented Apr 22, 2016

It's probably worth expanding on the script element.

At the very least I'd mention that <script src="..."></script> blocks content rendering while the script loads and executes, and add a non-blocking example with <script async src="..."></script>.

The scope of this project is not to explain every feature of each element that can go in <head>, but for important features it's probably a good idea to mention best practices.

@joshbuchea
Copy link
Owner

Excellent points. Will add. Thanks @fvsch!

@garycourt
Copy link

Don't forget about the new <script type="module"> for ES6 Module loading.

@marcobiedermann
Copy link
Collaborator

marcobiedermann commented Jul 2, 2016

@garycourt Do you have a link to the W3 specification of type="module"? Which browsers currently support this attribute?

@garycourt
Copy link

It's apart of the Living HTML Standard: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type

Currently, no browsers support it. But that will change quickly in the next 6 months.

@FlorianWendelborn
Copy link

If you change the <script/> anyway, you should also add the integrity attribute.

@joshbuchea
Copy link
Owner

joshbuchea commented Jan 22, 2018

Note: Add async, defer, and integrity attribute information and/or examples.

@ghost
Copy link

ghost commented Sep 30, 2019

any updates on this? I came here as I saw defer was missing from here:

https://htmlhead.dev

it should be there, if need be drawbacks can be included as well

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

No branches or pull requests

5 participants