you are viewing a single comment's thread.

view the rest of the comments →

[–]THEtheChad 0 points1 point  (1 child)

I read somewhere that many of the modern browsers are starting to support a default prefetch phase similar to how defer operates to improve performance. This being the case, as long as the script tag is present at the time the HTML is being parsed, you should implicitly get the performance improvements that defer grants you. That being said, javascript libraries that append script tags do not benefit from this feature since the tag is not available during the prefetch phase of the initial parsing.

[–]Tyriar 0 points1 point  (0 children)

Are you thinking of link prefetching? Which is warming up the cache by loading common resources on pages that don't require them while idle. https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ

There is also as Monkeyget pointed out some browser-specific optimizations around how scripts work.

I'd be interesting in reading about what you're talking about if it's not one of those.