W3C home > Mailing lists > Public > public-web-perf@w3.org > November 2013

Re: [resource hints] preconnect, preload, prender

From: Arvind Jain <arvind@google.com>
Date: Wed, 20 Nov 2013 20:28:04 -0800
Message-ID: <CAOYaDdMPSU1Rx0ikQzLUdMVvPYBzBfSZU7mMjBTDxVUp6h-Xyg@mail.gmail.com>
To: Tony Gentilcore <tonyg@google.com>
Cc: Ilya Grigorik <igrigorik@google.com>, public-web-perf <public-web-perf@w3.org>
We discussed this at the working group meeting last week.

We were trying to get <link rel=prerender> inserted into html5 spec and the
feedback we got was to take the specification language I put in the
microformats registry (http://microformats.org/wiki/rel-prerender) into a
new spec.

We can cover prefetch and dns-prefetch, both of which are also specified
(prefetch in html5 spec and dns-prefetch in registry) in the same spec.

We can collapse dns-prefetch into preconnect. But as Tony mentions, there
are different semantics associated with both. So we could keep them

We can also collapse prefetch  and subresource hints or again keep them

I think it is better to keep all 5 hints (dns, connect, prefetch,
subresource and prerender) - it gives developers maximum control.

But this is not the challenging part. I think the key issue raised by Ilya
was to have each one of these hints a well defined behaviour. e.g. he says:


   When/how many prerenders may be triggered and when prerender is aborted

How would you define this? Take a look at the prerender writeup (
http://microformats.org/wiki/rel-prerender) and suggest how to specify it


I love this proposal and think we should consider it in the group.
Jatinder, any thoughts from your end?

Some questions/thoughts on the specifics:
* Does <link rel="preconnect"> need a new attribute to indicate how
many connections to open? Or would the author just include the tag
multiple times if they want multiple connections?
* Does <link rel="preload"> do anything different than the <link
rel="subresource">[1] that chrome already supports?
* The part about prerendering things other than HTML is brilliant.
Could it parse CSS and compile JS as well? If so, does it need a more
general name?



On Mon, Nov 11, 2013 at 9:06 AM, Ilya Grigorik <igrigorik@google.com> wrote:
> Unfortunately won't make it to TPAC in person but seeing "prerender" topic
> on the agenda would like to share some thoughts on where I'd love to see
> effort go in the coming year...
> Specifically, I think the platform is missing some critical primitives
> can allow the site/app developers help the browser perform speculative
> optimization: preconnects, preloads, prerenders. Yes, we do have <link
> rel={dns-prefetch,prefetch,subresource,prerender}>, but in practice the
> current implementations of these hints often makes them less than useful -
> missing support, scheduling/prioritization gotchas, bad interop with
> preloaders, inconsistent implementation between different UAs, and so on.
> I think we should revisit what we've learned from our current hints and
> produce a spec around the three core primitives: preconnect, preload,
> prerender. To that end, drafted a quick doc describing the use cases and
> motivation for each one:
> Would love to hear any thoughts and feedback!
> P.S. Resource Hints spec as a 2014 goal? :)
Received on Thursday, 21 November 2013 04:28:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:37 UTC