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:
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.