This can be solved by loading functions. Parsing is done before the script is even downloaded, so the page appears to the user way before the previous example. Keeping things in order Another case pro defer : scripts marked async are executed in casual order, when they become available. Blocking rendering Neither async nor defer guarantee anything on blocking rendering. Edit this page.
For the support table, check caniuse. Maybe the factorial function is not the best one. Scripts marked defer are executed after parsing completes in the order which they are defined in the markup.
Edit this page.
In this example, the Maps API is loaded synchronously.
We omitted the async attribute from the script tag that loads the API, and we also.
This is the case of functions that return a value that is used later. This is the best thing you can do if you need to support older browsers that do not support two relatively recent features of HTML: async and defer. This is similar to how Microsoft Doloto works.
Blocking rendering Neither async nor defer guarantee anything on blocking rendering.