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

后端 未结 5 1647
孤独总比滥情好
孤独总比滥情好 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:03

    This is not a good idea for the following reasons:

    1. You will not enjoy the benefit of cache

    2. You will load unneeded resources in all of your pages

    3. You will have a hard time while developing your website because of large files with unrelated code branches

    4. If you work in a team you will have to work with your teammates on the same files always, which means that you will have a lot of merge conflicts.

提交回复
热议问题