Does putting scripts on the bottom of a web page speed up page load?

前端 未结 8 845
别跟我提以往
别跟我提以往 2020-12-03 01:30

Yahoo best practices states that putting JavaScript files on bottom might make your pages load faster. What is the experience with this? What are the side effects, if any? <

8条回答
  •  时光取名叫无心
    2020-12-03 01:40

    There are some points.

    1. It loads page fast since the JavaScript internal or external is on bottom.

    2. If you have not used a onLoad method of window in JavaScript it will start execution as soon as it rendered. The Script at bottom ensures that your script will execute after page load.

    3. If script is as a file means external then will render after the HTML image and other visual object that forms the page view.

    If you are using fireFox then there is a plug in to check the performance. Please do hit the firefox site for this plugin.

提交回复
热议问题