Re: Image sprites use cases

Patrick Garies wrote:
> * I'm a bit curious why it lists the MIME type as application/x-gzip; 

Looks like just a mistake.  I did say it's a very early draft, right?  ;)

> * I'm also curious if a format like *.7z would also work since it 
> compresses way better than ZIP does. Unfortunately, I don't know if you 
> can read and extract individual files from that format.

I don't either, and in general the toolchain support is spottier.  In 
particular, it involves finding a compression utility that can create 
.7z files on the part of the author.  zip has the benefit that support 
is pretty much ubiquitous.

> * I'm not sure how "already supported by browsers" is a "very desirable 
> trait".

I suspect mostly in the sense that it's more slightly clear that that 
there aren't implementation concerns like patent problems or inability 
to implement in a web browser period.  But I didn't write this proposal, 
so this is just my guess based on a 15-minute conversation with the 
author and the proposal itself.

> Can browsers actually open ZIP files

All Gecko-based browsers can, at least.

> Even if so, how does that make it better than any 
> other format aside from decreasing implementation effort (or is this the 
> key trait)?

That's a pretty key trait in general, yes.  ;)

> * Does "so you can put CSS and Javascript first in the file, and they 
> will unpacked and made available first" mean that these files need to 
> come first alphabetically via file names? Or is there a way to manually 
> specify order?

Zip files in general just package up files in whatever order you feed 
them into the algorithm.  For command-line zip file creation utilities 
it tends to be the order of the command line arguments, for example.

> * Of course, there's also the million dollar question: What is the 
> likelihood that a browser vendor would implement such a thing?

In the case of Gecko, I'd say fairly high.  I can't speak to other 
browser vendors, obviously.

I guess the really relevant question for this particular discussion is 
whether this is more or less likely to be implemented than 
sprite-related changes to CSS (whether those be changes to the 
processing model similar to what Bert is proposing or something else).

-Boris

Received on Tuesday, 1 September 2009 12:37:11 UTC