In JavaScript, HTML and CSS, what is the sequence in which these are loaded in a browser?
And also, is there any important reason for using that sequence?
In JavaScript, HTML and CSS, what is the sequence in which these are loaded in a browser?
And also, is there any important reason for using that sequence?
I believe loading is primarily asynchronous; so stylesheets may load asynchronously, like images, while the rest of the page is being read & loaded. When a script tag is encountered, it is loaded entirely and executed before moving forward to execute another script tag but some browsers have the capability to look forward to the existence of additional script tags and download the scripts while other scripts are loading or executing in order. This is probably not an authoritative answer but it can point you in the direction. There are likely to be other good posts on this, such as Sequence in which HTML page loads?
Cheers, Kylie