Best practices - Only download CSS you need, or use a minification process?

后端 未结 4 554
时光说笑
时光说笑 2021-01-01 03:20

In the context of improving overall site performance (downloading and rendering speed) there appears to be a contradiction between the following two best practices:

4条回答
  •  遥遥无期
    2021-01-01 03:41

    There is always trade-offs. If you find yourself making many CSS files and there are too many dependencies such that tracking which CSS file to inlcude becomes difficult, it would be better to make one (or at most two) CSS files and minify them. Hopefully your CSS files are not crazy-big.

提交回复
热议问题