- Where would you place a script to achieve the best page load speed?
- Should jQuery be in head or body?
Where would you place a script to achieve the best page load speed?
1 Answer. Yes, Infinite loops do still crash browsers (Or just the tab the JS is running in). However, most modern browsers can detect if a script’s hanging / running a infinite loop, and give you the option to abort the script.
Should jQuery be in head or body?
It’s always a good practice to add jQuery code in footer i.e. just before the closing