- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我听说 Firefox 3.5 在其 parser 中有一个新功能?
Improvements to the Gecko layout engine, including speculative parsing for faster content rendering.
最佳答案
这一切都与 bugzilla 中的这个条目有关:https://bugzilla.mozilla.org/show_bug.cgi?id=364315
在该条目中,Anders Holbøll 建议:
It seems that when encountering a script-tag, that references an external file, the browser does not attempt to load any elements after the script-tag until the external script files is loaded. This makes sites, that references several or large javascript files, slow.
...
Here file1.js will be loaded first, followed sequentially by file2.js. Then img1.gif, img2.gif and file3.js will be loaded concurrently. When file3.js has loaded completely, img3.gif will be loaded.One might argue that since the js-files could contain for instance a line like "
document.write('<!--');
", there is no way of knowing if any of the content following a script-tag will ever be show, before the script has been executed.But I would assume that it is far more probable that the content would be shown than not. And in these days it is quite common for pages to reference many external javascript files (ajax-libraries, statistics and advertising), which with the current behavior causes the page load to be serialized.
display: none
”之类的 css 参数或注释掉以下 html 的部分,并且通过这样做,使证书加载变得不必要……但是,在 95% 的用例中,大部分引用将被加载,因此解析器通常会正确猜测。
关于firefox - 什么是推测解析?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1072774/
我是一名优秀的程序员,十分优秀!