- From: Andy Davies <dajdavies@gmail.com>
- Date: Tue, 7 Aug 2012 16:08:33 +0100
- To: Sebastian Zartner <sebastianzartner@gmail.com>
- Cc: Florian Rivoal <florianr@opera.com>, www-style@w3.org
On 7 August 2012 15:25, Sebastian Zartner <sebastianzartner@gmail.com> wrote: >> I don't think this would work out well, for 2 reasons. >> >> 1) You want to decide which image to download based on their resolution. >> If you need to download them first, we have a bit of a loop here, which will >> result in wasted bandwidth. > > There will be some wasting of bandwidth, yes. Though normally not the whole > file has to be downloaded to get this information but just the header/meta > data. > It's not just the bandwidth, it's also about latency and wasted HTTP requests too. >From a performance perspective the browser should be only download one image, otherwise it's using up HTTP connections that could be used to retrieve other content that will be displayed to the user. Also if the browser were to download the header/meta data from multiple images to decide which one it needs then either the browser has to make a range request, or close the TCP connection to terminate the download. Closing the TCP connection 'breaks' any TCP keep-alive behaviour, and depending on the server configuration, it will have already served out initial congestion window * max segment size bytes - so roughly 3,000 to 15,000 bytes depending on the TCP config in use. Andy
Received on Tuesday, 7 August 2012 15:09:01 UTC