[webkit-dev] beforeload & link (esp rel prefetch)

Maciej Stachowiak mjs at apple.com
Wed Jan 12 17:07:19 PST 2011

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.


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
> Should HTML Link rel=prefetch have beforeload events?
> How about rel=icon and rel=dns-prefetch ?
> If the answer to (1) is yes, then should HTTP Link have events?  Really?
> Should HTML Link permit rel=subresource?
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110112/fb5aee78/attachment.html>

More information about the webkit-dev mailing list