[webkit-dev] beforeload & link (esp rel prefetch)
Darin Fisher
darin at chromium.org
Wed Jan 12 22:42:04 PST 2011
Firefox definitely supports rel=prefetch in HTTP Link headers. I believe it
also supports other rel types, like stylesheet. The rel=subresource bit is
something new.
Supporting the Link header enables web servers to inject <link> tags without
modifying the document, which can be useful, especially for intermediaries.
-Darin
On Wed, Jan 12, 2011 at 5:07 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>
> Do other browsers support these values in the HTTP Link header? Do Web
> sites use them? I think the idea of triggering subresource loads from HTTP
> headers instead of the HTML itself is problematic. We should support it only
> to the degree required for Web compatibility.
>
> Regards,
> Maciej
>
> On Jan 12, 2011, at 8:05 AM, Gavin Peters (蓋文彼德斯) wrote:
>
> Folks,
>
> Right now in WebKit, beforeload events are not universally sent for link
> elements. In particular, link elements with the rel type icon, dns-prefetch
> and prefetch do not generate beforeload events. In a recent review of bug
> 51941, ap raised the question that perhaps they should be sent. It's a good
> question!
>
> As background, I'm right now refactoring the HTMLLinkElement to pull out
> the loader that handles the abovementioned three rel types. I'm doing this
> in preparation for adding Link header support, initially for these three rel
> types, as they are not so controversial as for instance putting
> rel=stylesheet in the HTTP headers.
>
> Then, there's another complication. After the refactoring described in bug
> 51941, I'd like to move on and implement the Link header, bug 51940. It's
> clear that beforeload won't make sense for the Link header, since we can't
> allow JS in HTTP, and we can't delay following the Link until we have
> HTML+CSS+JS (since that would defeat the purpose of the HTTP header
> providing quick dispatch). As well, I will likely add another rel type
> "subresource" to our handling together with the header, which describes
> something like a prefetch, but required for the current page.
>
> So now I see a few questions
>
> 1. Should HTML Link rel=prefetch have beforeload events?
> 2. How about rel=icon and rel=dns-prefetch ?
> 3. If the answer to (1) is yes, then should HTTP Link have events?
> Really?
> 4. Should HTML Link permit rel=subresource?
> 5. If the answer to (4) is yes, should HTML Link rel=subresource have
> beforeload events?
>
> what do people think?
>
> - Gavin
>
> https://bugs.webkit.org/show_bug.cgi?id=51941
> https://bugs.webkit.org/show_bug.cgi?id=51940
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110112/723a250b/attachment.html>
More information about the webkit-dev
mailing list