[webkit-dev] Accept- & Content-Resolution headers proposal

Rob Burns robburns1 at mac.com
Thu Jun 7 15:07:52 PDT 2007


On Jun 7, 2007, at 3:52 PM, Andre-John Mas wrote:

> Surely all of this becomes moot if we specify objects in terms of  
> inches, cm or mm, all of which are already supported by css? A  
> browser that interprets these 'absolute' units properly should  
> already know what DPI the current environment is in, or have access  
> to the necessary API to display correctly.
>
> The problem that we have today is that some environments don't tell  
> the application the real DPI, so the application is left guessing  
> and mis-rendering things on screen.
>
> The other thing that must be taken account is that on a multi- 
> headed computer you may have two screens each with different DPIs.  
> If you were to send DPIs to a server, which one would you use? It  
> is for reasons such as this, that I believe, that it is important  
> that it the responsibility of the local system to work this out,  
> with the appropriates hints from the web page.
>

It seems that you're not reading the proposal.  This does call for  
the client to use whatever algorithm it deems appropriate to request  
an image of a certain pixel dimension (though I think my copy of  
Nicholas example may have read ppi, I meant to list pixel dimension).  
In any event, the server works to accommodate the client.  This isn't  
meant to help the client determine the absolute dimensions its meant  
to deliver efficiently sized content. If its too large, it waists  
bandwidth (at a UI responsiveness degrading moment) and then gets  
down-sampled by the client anyway. If its too small, it may look  
poor. CSS will not solve this (except for CSS related images). It  
needs content negotiation. And even for CSS with media queries, this  
is even more flexible.

Also, as I said before media queries do not accomplish what you're  
saying they accomplish. They don't leave things in the hands of the  
client, they're in the hands of the author. So if the author (maybe  
years before), decides to deliver an image of a certain size to the  
client, that's what the client gets. WebKit isn't going to be able to  
request a different size. Presumably the authro will make it  
appropriate for the client (based on the media query), but the author  
does no necessarily know anymore about WebKit's image processing  
capabilities (whether it prefers an image twice the size to one a  
little smaller than the requested size). So the solution proposed  
here actually puts more control in the clien't's hands than CSS media  
queries (unless the client starts lying about its meda environment,  
but I don't think that would be good practice).

Take care,
Rob.

PS, again my suggestion is for the client to request specific pixel  
dimensions for the media not the ppi/dpi/cmpi) If the the UA is in an  
environment with multiple displays or multiple resolution output of  
any kind it can use that in determining the pixel dimensions to  
request. Otherwise, it can re-request the image for the new output  
device..



More information about the webkit-dev mailing list