[whatwg] Resolutions meta tag proposal

Marques Johansson marques at displague.com
Sun Jul 4 05:34:29 PDT 2010

Another way about handling this PPI ratio business would be with HTTP 300
multiple choice.

This may not be the best answer for every image on a page, but the first
HTML page in a server controlled session could store the PPI ratio setting
based on the page the UA chooses and then modify the HTML or
content-negotiation setting.  A problem with this is that the browsers
wouldn't be likely to render a page correctly unless they were modified for
this image request yields 300 behavior.

I still like something like this for client content negotiation:

GET /image/dog HTTP/1.1
Accept: image/*; ppiratio=2
HTTP/1.1 200 OK
Content-type: image/jpeg
... dog at 2x.jpg

Apache rewrite rules could even handle this by detecting ppiratio in the
Accept header and then looking for a matching images/ratio/2/dog file.  If
it didn't exist the rewrite would fail resulting in the server responding
with images/dog which is suitable if not optimal.

This has me thinking "Accept: image/*; x=400; y=300" could be attached with
any image request based on clients intent for the image.  (The HTML said
'width=400 height=300' so I don't need anything better.)  The server can
ignore this or return something better suited than the 1200x1200 image that
it would otherwise return.

I still don't have a handle on this retinal / ppi stuff so "ppiratio" may be
the wording.

I also like "Accept: video/*; kbps=500" for a similar purpose.

2010/7/3 timeless <timeless at gmail.com>

> 2010/7/3 André Luís <andreluis.pt at gmail.com>:
> > (alt-option 1) Trying to step away from the solution presented, I can
> > only imagine something along the lines of different src attributes for
> > different resolutions:
> >
> > <img src="imgs/standard-def.png" src-2x="imgs/high-def.png">
> > <video src="movs/sd.ogv" src-2x="movs/hd.ogv">
> <img lowsrc> used to exist:
> http://www.htmlcodetutorial.com/images/_IMG_LOWSRC.html
> it's mostly gone now.
> I think that if someone wants to be fancy they can use the existing
> features (min-device-pixel-ratio, alternate stylesheets) and hide the
> <img> content and replace it with background images or something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100704/d7a8c54b/attachment-0002.htm>

More information about the whatwg mailing list