- From: Jamie Lokier <jamie@shareable.org>
- Date: Wed, 18 Nov 2009 16:48:26 +0000
- To: Anthony Bryan <anthonybryan@gmail.com>
- Cc: HTTP Working Group <ietf-http-wg@w3.org>
Anthony Bryan wrote: > http://limi.net/articles/resource-packages/ > > Making browsers faster: Resource Packages > > A proposal to make downloading web page resources faster in all browsers. > > Introduction & Rationale > > What if there was a backwards compatible way to transfer all of the > resources that are used on every single page in your site — CSS, JS, > images, anything else — in a single HTTP request at the start of the > first visit to the page? This is what Resource Package support in > browsers will let you do. Why is this better than HTTP pipelining? If the issue is HTTP pipelining is not widely used by clients, or not aggressively enough, perhaps the solution is a something sent by the server, perhaps in a HTML META element (same way as Resource Packages), which says "it's ok, you can use pipelining aggressively on *the following resources* <list of URIs>". It seems to me that HTTP pipelining requires the browser to: 1. Receive first part of initial page. 2. Send data block which is a set of requests for the additional resources. 3. Receive all the resources in order. Whereas Resource Packages require the browser to: 1. Receive first part of initial page. 2. Send data block which is request for the resource package. 3. Receive all the resources in order. With the main performance differences being: a. The batch of requests for HTTP pipelining will use more bytes, but need not be a lot if the browser is sensible. In modern networks, performance is determined by number of packets and timing, not just bytes, and multiple requests are batched into single packets if the timing is right. b. Use of Resource Packages implies unnecessary downloads by browsers which have disabled Javascript and/or images, or are text-only. They can simply not download the Resource Package, of course, but that seems rather defeatist, because a main reason to disable images is to speed up downloads, not to be penalised for it. c. Use of Resource Packages is wasteful if some but not all of the resources are cached, either locally or in proxies. This is most likely when some of the resources are changed. And for the long term: d. Future optimisations to HTTP, such as HTTP over SCTP, Google's SPDY, Multi-server HTTP and others, may transfer multiple resources more efficiently, for example by prioritising the most important requests, and sending differences from previously cached values. Resource Packages may, to some extent, thwart some of these strategies. Then again, if Resource Packages become widely used, it's possible that protocol, server and proxy design will evolve to include generating them on demand and dynamically modifying them to optimise transfers. To allow this, IMHO it's important that Resource Packages are identified as such, so that proxies and caches will be able to safely inspect and modify them in future if the need arises. -- Jamie
Received on Wednesday, 18 November 2009 16:49:02 UTC