You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same could be applied to the other 3 scripts in the src/site/resources/js directory:
anchors.js
copy-clipboard.js
google-analytics.js
This will ensure that all scripts are fetched in the background and do not block the HTML parser.
Important
Each script has to be examined before applying the 2 attributes. This is because race conditions can occur if there is a DOMContentLoaded event listener inside the script. See #18036 (comment) for more information.
Continuation of #18036 (comment)
In that PR, we added
asyncanddeferto thecheckstyle.js<script>tag to ensure it loads faster and does not cause flickering on user's screen:The same could be applied to the other 3 scripts in the
src/site/resources/jsdirectory:anchors.jscopy-clipboard.jsgoogle-analytics.jsThis will ensure that all scripts are fetched in the background and do not block the HTML parser.
Important
Each script has to be examined before applying the 2 attributes. This is because race conditions can occur if there is a
DOMContentLoadedevent listener inside the script. See #18036 (comment) for more information.