简体   繁体   English

CSS解析顺序提高性能

[英]Css parse order improve performance

Would css parse quicker if it was in the order that its needed on page? 如果css按页面所需的顺序解析,会更快吗? If so what sort of difference would it make and are there any online tools that would sort it in order? 如果是这样,它将产生什么样的变化?是否有任何在线工具可以对它进行排序?

As others have said, as far as CSS parsing goes, I would assume this to be negligible. 正如其他人所说,就CSS解析而言,我认为这可以忽略不计。 However, this is definitely true for HTML when loading JS or CSS . 但是, 在加载JS或CSS时,HTML绝对正确 It becomes especially noticable when downloading from multiple CDNs. 从多个CDN下载时,它尤其值得注意。

If you are concerned and can host the site on either github.io or your own webpage, use Google Pagespeed Insights to benchmark performance on more basic things. 如果您担心并可以在github.io或您自己的网页上托管该网站,请使用Google Pagespeed Insights对更基本的内容进行基准测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM