W3C home > Mailing lists > Public > public-html@w3.org > December 2009

Re: Change proposal: Adding a sprite attribute to img tags

From: Roy T. Fielding <fielding@gbiv.com>
Date: Thu, 3 Dec 2009 18:29:14 -0800
Cc: public-html@w3.org
Message-Id: <6554C8B5-1641-4F5A-9A8B-ECC38D6D625F@gbiv.com>
To: David Calhoun <david.b.calhoun@gmail.com>
On Dec 3, 2009, at 5:16 PM, David Calhoun wrote:

> It would be nice to be able to specify which images should be downloaded together in one gzipped file.
> For instance, presently we have code which looks like the following:
> img src="pic1.png"
> img src="pic2.png"
> Presently these images are sent with two separate requests.  With a new attribute, a flag can be set to specify that they should be sent down the wire together in one gzip:
> img src="pic1.png" spriteid="1"
> img src="pic2.png" spriteid="1"
> This would allow the use of multiple spriteids for multiple sets of "sprites".
> The actual request to the server might look something like this (this is influenced by the way YUI3 uses combo handling for JS):
> http://domain.com/?spriteid=1&pic1.png&pic2.png

That's a horrible idea.  First, it effectively disables all
intermediate caches.  Second, it adds an infinite number of
new URIs by which these resources are now accessed and for
which access control, indexing, and caching might be affected.
Third, it foolishly tries to compress representations that
are already in a compressed format.  Fourth, it pushes the
sizing metadata needed by the rendering algorithm into the
middle of an encapsulating entity instead of in the first
few bytes of the representation.  Fifth, it is guaranteed
to be slower than pipelining the GET requests because both
the client and the server have to do twice as much work
even in the best case.

Received on Friday, 4 December 2009 02:29:44 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:04 UTC