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

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.

....Roy

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