View Single Post
Old 07-28-2019, 08:13 PM
Ronie's Avatar
Ronie Ronie is offline
Join Date: Nov 2014
Posts: 382
Lightbulb How important it is to load javascript in footer ?

If you include external js files at the bottom of your page, you give the priority of your HTTP requests to the visual display that will be presented to the client instead of to the logic of interaction or dynamics. I believe, if you do not use a content delivery network to deliver images to the client then you are only allowed to process a maximum of 2 HTTP requests at a time. You do not want to waste these requests on logic because we all know how impatient the end user is.

By loading js at then end of the file you can access the DOM(most of the time) without having to call a document.ready() function. You know that if the page render finally makes it to your javascript code that the necessary page elements have usually loaded already.
[28 April 2015 10:23 am] She said: right now i am still on my bed going nowhere
[28 April 2015 10:23 am] She said: just here....
[28 April 2015 10:24 am] She said: now i want you please to rest.sleep as much as u can.
[28 April 2015 10:24 am] She said: dont think about anything else....
[28 April 2015 10:25 am] She said: remember that i am only yours and u r only mine.
[28 April 2015 10:25 am] She said: and i love you more than what u see in me
[28 April 2015 10:26 am] She said: (kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(k iss)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(kis s)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss)(kiss) (kiss)(kiss)(kiss)(kiss)(kiss)(kiss)
Reply With Quote