0
What situation would need you to load javascript first before html and css?
3 Respostas
+ 3
If the script doesn't refer any element in the document then it's okay to load the script before the document contents are loaded.
Otherwise, the page may not load properly due to an error that happens when the script or parts of it tries to get an element's reference and fail on its way, because the targeted element wasn't loaded at the time.
+ 2
Hi! why did you decide that the situation requires the first download of javascript?
+ 1
Sometimes HTML and CSS are dynamically generated by javascript you only need to run js on your page first and foremost.