I was reading this very interesting article for implementing async style loading of js on my site here http://css-tricks.com/thinking-async/.
My requirements are ability to load a javascript file in a async way and then call an initialization method from the file after it has successfully loaded. Which method is preferred way ie using the classic async way or using jQuery's getscript method as described in the above mentioned article? What are the merits or demerits of using one over the other?
EDIT: My take is: Lets say we are loading a js and then we want to call back an initialization function after successful load of the js file.This needs to happen as soon as possible because the whole module should be parsed and executed during page loading without waiting for document.ready or window.onload. Trying to do this via classic async way could lead to dealing with cross browser issues and rigourous testing, whereas if we use jquery ajax(or getscript method) we can avoid the hassles.
Also looking for this solution to load a single js file in a async way without using any library.