Repository navigation
v5.3.1
A script nothing waits for no longer holds up the page.
async for meta.scripts
{ "src": "…", "async": true }loads a library with<script async>
instead ofdefer. Deferred scripts run in order, and every
meta.scriptsentry is linked ahead of the compiled code — so a large
library nothing on the page uses, such as Google's 175 KBgtag.js, held
the page's code, and the first full paint, until it had arrived. On a
slow phone that was over a second of largest-contentful-paint. Anasync
script runs whenever it arrives, as the vendors' own snippets load it.- A module, or a script whose
globals.wfcode calls, cannot beasync
— the one is imported by the page's loader, the other might arrive after
the code that calls it — and isE111. - The security chapter's tag-manager example loads
gtag.jsthis way. - For the Rust API:
ScriptSpecgains a publicis_asyncfield, so code
that builds one with a struct literal addsis_async: false.
Full Changelog: v5.3.0...v5.3.1