- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Sat, 9 Nov 2013 11:49:22 +0100
- To: "'Bruno Racineux'" <bruno@hexanet.net>, "'Rafael Rinaldi'" <rafael.rinaldi@gmail.com>, "'Yoav Weiss'" <yoav@yoav.ws>, "'Ian Hickson'" <ian@hixie.ch>
- Cc: 'WHATWG' <whatwg@whatwg.org>
On Saturday, November 09, 2013 12:53 AM, Bruno Racineux wrote: > On 11/8/13 10:46 AM, "Rafael Rinaldi" <rafael.rinaldi@gmail.com> wrote: > > >It looks complex because it tries to solve something complex. I think > >therešs no way to avoid verbosity to solve such thing. > > The only way to avoid verbosity on every <img> element would be to > predefine a relationship between the names/keywords of your images and > their respective sizes, ONCE in the <head>. The browser can then > substitute the img suffix to get the right image, without having to > spell-out the full image name every time. Well, an alternative would be to move the complexity to the server. I very much doubt that webmasters are going to create all those variations manually anyway. And if so, it's enough to store them according a naming convention the server understands. There are already two proposals how this could work: http://tools.ietf.org/html/draft-grigorik-http-client-hints-00 http://tools.ietf.org/html/draft-snell-http-prefer-18 The browser then just needs to make sure that the right headers are set. We would to be very careful though to not destroy the cacheability of responses. Of course, some form of URL templating would work as well but that probably would become quite complex. -- Markus Lanthaler @markuslanthaler
Received on Saturday, 9 November 2013 10:49:54 UTC