Why is this important?
What does the Hint check?
Examples that trigger this Hint:
How do you resolve this issue?
To change this behaviour, you can add async or defer attributes:
- With async, the browser downloads the script asynchronously while it continues to parse the HTML document. When the script finishes downloading, parsing is blocked while the script executes.
- With defer, the browser downloads the script asynchronously while it continues to parse the HTML document. The script doesn't run until the parsing is complete.
In general, you should always use async or defer for third party scripts (unless the script does something necessary for the critical rendering path):
- Use async if it's important to have the script run earlier in the loading process. This might include some analytics scripts, for example.
- Use defer for less critical resources. A video player that's below-the-fold, for example.