Put javascript and css inline in a single minified html file to improve performance?

后端 未结 5 1657
孤独总比滥情好
孤独总比滥情好 2021-02-13 02:29

A typical website consists of one index.html file and a bunch of javascript and css files. To improve the performance of the website, one can:

  • Minify the javascrip
5条回答
  •  一个人的身影
    2021-02-13 03:19

    Concatinating your CSS and JS files into one file will reduce the number of requests and make it load faster. But as commented, it won't make much sense unless you have a one-page site and the load time of that page is very critical. So you're better off to separate CSS from Javascript in my opinion.

    Here's a book where you can learn more about the topic:

    High Performance Web Sites

提交回复
热议问题