[webkit-dev] X-Purpose on prefetching requests

Gavin Peters (蓋文彼德斯) gavinp at chromium.org
Tue Sep 28 07:58:53 PDT 2010


Noone has commented on this thread in some time; is this less controversial now?

On 24 September 2010 21:27, Alexey Proskuryakov <ap at webkit.org> wrote:
>
> Eric has made another good point in Bugzilla - we don't explain the purpose in lots of other cases, from loading into a display:none frame to XMLHttpRequest. Why should Prefetch be all the different?
>

Those requests are still part of loading a page as requested by the
user, and failing them or returning a 500 will result in undefined
behaviour; the result of failing part of a page is unpredictable.

In the case of prefetches, we're in a very different space.  The
prefetch load has no effects on the DOM of the current resource
(unlike display:none elements).  There is no javascript event, or
history impact, etc... (unlike XMLHttpRequest).   A subsequent
navigation will occur correctly whether there was no prefetch, a
prefetch that failed, a prefetch that requires revalidation, and a
prefetch that can be used without revalidation.

So that, in my mind, leaves the balance in favour of emitting the
header, as Mozilla & Safari currently do in similar situations.

Thoughts?

- Gavin


More information about the webkit-dev mailing list