The WHAT-WG HTML spec goes into great detail about how scripts are loaded.
The fundamental difference — try not to laugh — is that the one is part of the HTML and the other is generated by JavaScript code.
With the script tag in the HTML:
- The browser can discover and begin downloading (but not executing) the script in parallel with the DOM builder until the DOM builder reaches that point in the token stream
- The script is also allowed to use
document.write without blowing away the document
- The main JavaScript UI thread isn't held up until the script is actually executed
When you add the script element with JavaScript code with async = false:
- The browser can't pre-download it
- The script can't use
document.write without blowing away the document
- The main JavaScript UI thread is blocked waiting for the download, not just when the script is executing
While it's true that <script src="..."></script> without the async or defer attribute (e.g., a blocking script tag) blocks page load, the impact can be less severe.
That said, I'd be very surprised if PageSpeed doesn't complain about a blocking script tag in the head. Without very good reason to do something else, blocking script tags should be at the end of body, just prior to the closing </body> tag.
From the comments, it seems you're using Google scripts, and you've said they want the script tags in head. They probably mean for you to use defer (to preserve order between the scripts):
<script src="jquery.js" defer></script>
<script src="gtm.js" defer></script>
...in head. defer means that the scripts don't hold up the DOM (they download in parallel but don't run until DOM parsing is complete), but do execute in order.
jQueryfile without async becauseGTMis dependent upon it." All that means is that you need to load GTM after jQuery. It doesn't mean you have to load jQuery synchronously.First Wayat the top of page and beforeGTM. And GTM is loadedasync. So,jQuerycan't beasyncas well.GTMisGoogle Tag Manager. Its not justGoogle Tag Managerthat I have to load but alsoGoogle OptimizeandGoogle AnalyticsforGoogle Experiments. And they all load async.<script src="..." async></script>tags. Which is almost certainly what Google means; if you look deeper in the documentation, you should find actual examples.