On Tue, 17 Dec 2013 17:06:57 +0100, Boris Zbarsky <[email protected]> wrote:
On 12/17/13 3:29 AM, Jonas Sicking wrote:
This is a good point. Would this have performance implications for
down-level browsers? I don't know if prescanners etc in contemporary
browsers are smart enough to ignore <script> tags that use a non-JS
type attribute.
Gecko's is not. Not least because as far as I can tell scripts with
unknown type are in fact always loaded,
In my testing this appears to not be the case.
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2697
This gives nothing in the Network tab in Firefox or in my TCP inspector.
I think this is the same as what the spec requires and what at least
WebKit/Blink/Presto also do.
See step 7 in
http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script
(the fetch happen in step 14).
But it seems you are correct about the behavior of the speculative parser
in Gecko:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2698
just not executed, and block the parser while they're loading, so you do
in fact want to preload them! I'm not sure whether that behavior is
Gecko-specific or not, but I suspect not: I recall people using unknown
script types to do preloading in general.
-Boris
--
Simon Pieters
Opera Software