- From: Robin Berjon <robin@w3.org>
- Date: Fri, 10 May 2013 15:54:34 +0200
- To: Brian Kardell <bkardell@gmail.com>
- CC: public-webapps@w3.org, Marcos Caceres <w3c@marcosc.com>, Jonas Sicking <jonas@sicking.cc>
Hi Brian, On 10/05/2013 15:32 , Brian Kardell wrote: > Would it be possible (not suggesting this would be the common story) to > reference a zipped asset directly via the full url, sans a link tag? Can you hash out a little bit more how this would work? I'm assuming you mean something like: <img src='/bundle.zip/img/dahut.jpg'> Without any prior set up on the client to indicate that /bundle.zip is a bundle. This causes the browser to issue GET /bundle.zip/img/dahut.jpg At that point, the server can: a) return a 404; b) extract the image and return that; c) return bundle.zip with some header information telling the browser that it's not an image but that the "/bundle.zip" part of the URL matched something else and it should look inside it for the rest of the path. Neither (a) nor (b) are very useful to us. (c) could be made to work, but it's not exactly elegant. The server would also have to know if the UA supports (c), and fall back to (b) if not, which means that some signalling needs to be made in the request. That's also not entirely nice (and it would have to happen on every request since the browser can't guess). It gets particularly nasty when you have this: <img src='/bundle.zip/img/dahut.jpg'> <img src='/bundle.zip/img/unicorn.jpg'> <img src='/bundle.zip/img/chupacabra.jpg'> <img src='/bundle.zip/img/robin-at-the-beach.jpg'> The chances are good that the browser would issue several of those requests before the first one returned with the information telling it to look in the bundle. That means it would return the bundle several times. Definitely a loss. Or did I misunderstand what you had in mind? -- Robin Berjon - http://berjon.com/ - @robinberjon
Received on Friday, 10 May 2013 13:54:45 UTC