Website Loading Order JS

Avatar
  • Answered
Some pieces of my website load faster than others. I have noticed that external java scripts are loading before my header image is. How do I make it so that the external scripts load after my main page content loads? I have used GT Metrix which has also pointed out this issue.
Avatar
CaseyB
Hello, Thank you for your question about speeding up your website. To load your external scripts last, you will need to place them at the bottom of your website coding, just inside of the closing </body> HTML tag. Alternatively, you can use the 'defer' attribute on your script tag. However, if at all possible I would recommend downloading the JavaScript files that you are using, and uploading them to your site. This will improve the performance of your site in relation to your scripts even more. Gratefully, Casey B.