I was under the impression that for the best performance, Javascript should be treated as static content and served from a cookieless domain along with CSS files, images, etc.
But Google says here: Don't serve early loaded external JS files from the cookieless domain
For JavaScript referenced in the head of the document and needed for page startup, it should be served from the same hostname as the main document. Because most browsers block other downloads and rendering until all JavaScript files have been downloaded, parsed and executed, it's better to avoid the risk of an additional DNS lookup at this point of processing.
So now I am conflicted. I am not clear on what "needed for page startup" means.
I typically have two JavaScript references, JQuery served from ajax.googleapis.com and a master.js file that mostly contains event handlers in the $(document).ready() function. Is this needed for page startup?
Given the options available, (ajax.googleapis.com, static cookieless domain, original hostname) where should my JavaScript be served?