I was testing the web page loading with Google PageSpeed tool. The result says "Eliminate render-blocking JavaScript and CSS in above-the-fold content" for
<script type='text/javascript' src='http://example.com/wp-includes/js/jquery/jquery.js?ver=1.11.2'></script>
<script type='text/javascript' src='http://example.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
The source code is:
<head>
...
...
<script>(function(){document.documentElement.className='js'})();</script>
...
...
</head>
I'm keen to add a async or defer tag. How can I achieve this?
From MDN about the async attribute:
It has no effect on inline scripts (i.e., scripts that don't have the src attribute).
The same is true about the defer attribute.
Basically, if you really want to get rid of the error, just move that to just before the </body>
tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With