For users on slow connections,
such as 2G, 3G, or slow Wi-Fi,
external scripts dynamically injected via
can delay the display of main page content by tens of seconds.
Lighthouse lists out every call to
See Intervening against
to learn more.
How this audit fails
Lighthouse reports every instance of
document.write() that it encounters.
Chrome's intervention against
document.write() only applies
to render-blocking, dynamically-injected scripts.
Other uses of
document.write() may be acceptable.
Each Best Practices audit is weighted equally in the Lighthouse Best Practices Score. Learn more in The Best Practices score.
Review the usage of
If the script meets the criteria outlined in the introduction to
Chrome won't execute the injected script.
These are the calls to
document.write() that you want to change.
See How do I fix this? for possible solutions.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.