Skip to content

Conversation

zowiebeha
Copy link
Contributor

@zowiebeha zowiebeha commented Oct 5, 2025

In the code examples, a <script> tag is
placed just before the ending </body> tag.
This causes the script's external resource to
download and execute only after the HTML has been
parsed up to that point.

For organization and faster script evaluation,
we can consolidate scripts in the <head>
and enable their defer attribute, which will
download the external resource in parallel with
HTML parsing. Once the HTML is parsed, the
deferred script will execute.

Copy link

vercel bot commented Oct 5, 2025

@zowiebeha is attempting to deploy a commit to the OpenJS Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defer is alternative loading, so let's add another one alternative example with defer, don't change currents

In the code examples, a <script> tag is
placed just before the ending </body> tag.
This causes the script's external resource to
download and execute only after the HTML has been
parsed up to that point.

For organization and faster script evaluation,
we can consolidate scripts in the <head>
and enable their defer attribute, which will
download the external resource in parallel with
HTML parsing. Once the HTML is parsed, the
deferred script will execute.
@zowiebeha zowiebeha force-pushed the getting-started-fix branch from 6b6fd05 to f14be15 Compare October 11, 2025 14:20
Copy link

vercel bot commented Oct 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
webpack-js-org Ready Ready Preview Comment Oct 11, 2025 10:45pm

@evenstensberg
Copy link
Member

Thank you for the contribution! 💙

@evenstensberg evenstensberg merged commit d803b54 into webpack:main Oct 11, 2025
8 checks passed
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.

3 participants