SawFirst Forum

SawFirst Forum (https://www.sawfirst.com/forum/index.php)
-   Search Engine Optimization (https://www.sawfirst.com/forum/forumdisplay.php?f=20)
-   -   How important it is to load javascript in footer ? (https://www.sawfirst.com/forum/showthread.php?t=427)

Ronie 07-28-2019 08:13 PM

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.

alucca 05-31-2021 04:00 AM

Thanks for sharing

alucca 05-31-2021 04:01 AM

Can you introduce some other programming languages?


All times are GMT. The time now is 07:33 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.