[Webkit-unassigned] [Bug 57842] Add support for link rel type "subresource"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 5 10:40:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57842





--- Comment #12 from Tony Gentilcore <tonyg at chromium.org>  2011-04-05 10:40:01 PST ---
> Re: the test
> 
> I can definitely write the test, but right now I don't think we'd pass it.  We'll make a second request, and as a result go back to our disk cache.  In the case of non-cacheable content, a 304 is the best case afaik.

I don't see the point of exposing rel=subresource without it. Perhaps I'm not understanding the use-case, but I thought the primary use case is for performance. With that bug in place, it is just a performance booby trap. Maybe I'm missing another use-case?

> Re: preload scanning
> 
> I'm not totally convinced here.  I don't know how useful the HTML rel=subresource type is, and as Alexey points out above, it's really most useful in the HTTP.  However, without a preload scanner, I suppose it is totally useless.  The other concern is that a preload scanner will hide the network prioritization bug https://bugs.webkit.org/show_bug.cgi?id=49238 , so I would at least want to hold off until we land that.

Actually, I think the HTML tag is very useful. Last week a web perf optimization guy emailed me about how to preload subresources in WebKit. The best technique he had found was to preload the subresources into <object> elements. Unfortunately, this is a pretty bad idea as the object actually acts like an iframe in that case, meaning that any textual content gets layout. The 200k compiled JS resource he was preloading took 500ms to perform line breaking on my workstation (see bug 56796). Unfortunately, I couldn't offer any reasonable approach other than to wait for something like rel=subresource.

On a similar note, a couple of months ago, there was a large thread on the whatwg about introducing a noexecute attribute to the <script> element so that a script could be downloaded without execution (see http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-February/030161.html). A problem with that proposal is that it only addresses preloading a subresource for scripts. With rel=subresource, a web dev could effectively preload any type of subresource needed by the page.

I think rel=subresource addresses these types of use cases in a really general way. Whether the preload scanner detects it is orthogonal to this patch, I just thought I'd bring it up.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list