I've read that Firefox 3.5 has a new feature in its parser ?
Improvements to the Gecko layout engine, including speculative parsing for faster content rendering.
Could you explain that in simple terms.
I've read that Firefox 3.5 has a new feature in its parser ?
Improvements to the Gecko layout engine, including speculative parsing for faster content rendering.
Could you explain that in simple terms.
I think it means that when the browser would normally block (for example for a script tag), it will continue to parse the HTML. It will not create an actual DOM until the missing pieces are loaded, but it will start fetching script files and stylesheets in the background.
It's all to do with this entry in bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=364315
In that entry, Anders Holbøll suggested:
So essentially, the html parser continues reading through the html file and loading referenced links, even if it is blocked from rendering due to a script.
It's called "speculative" because the script might do things like setting css parameters like "
display: none
" or commenting out sections of the following html, and by doing so, making certian loads unnecessary... However, in the 95% use case, most of the references will be loaded, so the parser is usually guessing correctly.