Is it better to load many small JavaScript files or one large JavaScript file?

前端 未结 5 965
自闭症患者
自闭症患者 2021-02-05 13:43

I have noticed in chrome that if I load an image as a base64 string and then scroll through that part of the page it will slow down.

I have also noticed that when I navi

5条回答
  •  北海茫月
    2021-02-05 14:26

    The number of files to load has an impact on the load speed of the whole site. I would recommend to pack into a single javascript file all the required functionality for the website to display properly.

提交回复
热议问题