W3C home > Mailing lists > Public > public-web-perf@w3.org > June 2014

Re: cache hints and preresolutions

From: <bizzbyster@gmail.com>
Date: Wed, 25 Jun 2014 09:58:06 -0400
Message-Id: <4A1823DC-80E1-49D5-82E6-B50474E7BF3A@gmail.com>
To: "public-web-perf@w3.org" <public-web-perf@w3.org>
I have a third addition that I forget to mention: expected object size.

Often the server will know the expected size of a sub-resource. This size helps the browser to fetch the object optimally as it allows the browser to figure out how to assign requests across a pool of TCP connections given the state of those connections. So, for instance, if I have to download 4 objects and I know their sizes -- the first three are 1.5 KB and the fourth is 4.5 KB. Then I can request the first three over one HTTP/2 connection to a server with an initcwnd of 3 and the fourth over a second HTTP/2 connection of initcwnd 3. This allows me to fetch all four resources in a single round trip.

Intelligent use of expected file sizes to optimize the use of TCP connection pools has a huge performance benefit for fetching a large number of small objects.

Do you agree this type of information can be included in sub-resource hints?

Thanks,

Peter


On Jun 23, 2014, at 2:32 PM, bizzbyster@gmail.com wrote:

> Ilya,
> 
> Two additions to your doc: https://docs.google.com/document/d/1HeTVglnZHD_mGSaID1gUZPqLAa1lXWObV-Zkx6q_HF4/edit.
> 
> Cache hints:
> We talked about the idea of supplying version information in preload (or subresource) hints via the sub-resource integrity attribute. But I'm not crazy about that idea b/c it means the browser needs to load an object from the browser disk cache and run a checksum on it in order to check whether or not that resource is the same as the one in the preload hint. Why not just allow us to specify cache version information via Last-Modified-Time and/or Etag? This makes it easy and fast to check to see if the cached version is current or not. Perhaps this could be a new attribute (version?) of the LINK header?
> 
> Preresolutions:
> Also, it would be great if we could specify the result of DNS lookups and also inline HTTP responses. So, for instance, let's say I have a site called simple.html that has an iframe hosted by a third party site. That third party site includes a URL that always receives a 301 Permanent redirect. It'd be great if we could optimize the loading of the page by simply including that 301 response code and Location header in as a "preresolution" up front along with the other resource hints.
> 
> Thoughts? Anyone else?
> 
> Peter
> 
> 
Received on Wednesday, 25 June 2014 13:58:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:38 UTC