Another way about handling this PPI ratio business would be with HTTP 300 multiple choice. <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1</a><div>
<div><br></div><div>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.</div>
<div><br></div><div>I still like something like this for client content negotiation:</div><div><br></div><div>GET /image/dog HTTP/1.1</div><div>Accept: image/*; ppiratio=2</div><div>...</div><div>HTTP/1.1 200 OK</div><div>
Content-type: image/jpeg</div><div>... dog@2x.jpg</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>I still don't have a handle on this retinal / ppi stuff so "ppiratio" may be the wording.</div><div> </div><div>I also like "Accept: video/*; kbps=500" for a similar purpose.</div>
<div><br></div><div><br></div><div>2010/7/3 timeless <span dir="ltr"><<a href="mailto:timeless@gmail.com">timeless@gmail.com</a>></span></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2010/7/3 André Luís <<a href="http://andreluis.pt" target="_blank">andreluis.pt</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>>:<br>
<div class="im">> (alt-option 1) Trying to step away from the solution presented, I can<br>
> only imagine something along the lines of different src attributes for<br>
> different resolutions:<br>
><br>
> <img src="imgs/standard-def.png" src-2x="imgs/high-def.png"><br>
> <video src="movs/sd.ogv" src-2x="movs/hd.ogv"><br>
<br>
</div><img lowsrc> used to exist:<br>
<a href="http://www.htmlcodetutorial.com/images/_IMG_LOWSRC.html" target="_blank">http://www.htmlcodetutorial.com/images/_IMG_LOWSRC.html</a><br>
<br>
it's mostly gone now.<br>
<br>
I think that if someone wants to be fancy they can use the existing<br>
features (min-device-pixel-ratio, alternate stylesheets) and hide the<br>
<img> content and replace it with background images or something.<br>
</blockquote></div><br></div></div>