[whatwg] Resolutions meta tag proposal
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
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
... 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
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:
> 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...
More information about the whatwg