The default scripts, when they appear on the html page, block the rest of the page upon loading. Only when they have finished loading and executing does the rest of the page continue to load. From high-performance Javascript from Nicholas K. Zakas :
This is an integral part of the page life cycle, as the script can lead to page changes at runtime. A typical example is using document.write () in the middle of the page (how often ads are used).
By inserting a script dynamically, as done above, you can overcome this behavior - without blocking the page - loads occur asynchronously.
By placing the object at the bottom of the page, you will see that html and css are loaded before javascript. Thus, while javascript is loading, the user can already see the page.
All about performance.
source share