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

Peter Speck speck at vitality.dk
Fri Jun 8 01:02:16 PDT 2007


(sorry for the spam if it's duplicate - it seemed like the server  
discarded the email)

More systematic description of idea with using ranges:

The Accept-Resolution header has the same overall syntax as the other  
accept headers to simplify parsing (and reduce bugs in web-servers).  
Each item-value is a range of non-negative integer dpi values. The  
range includes both values and the two values are separated by a  
dash. A range with the first number larger than the second is empty/ 
invalid and is ignored.
If multiple medias match a range, the media closest to the range's  
midpoint is selected.

If the header is not specified, it is equvalent to:
	Accept-Resolution: 70-80;q=3, 50-150;q=2, *;q=1
so the server defaults to send media fitted for most computer displays.

If the header is specified, no default value/asterix is assumed. If  
no range match the available media, a 406 error is returned.

To get normal usage for a desktop browser:
	Accept-Resolution: 70-80;q=3, 50-150;q=2, *;q=1

A high-resolution for printing would use e.g.:
	Accept-Resolution: 250-400;q=3, 150-600;q=2, *;q=1

A phone could use:
	Accept-Resolution: 70-80;q=3, 10-120;q=2
as the phone doesn't specify the asterix, no media of dpi=200 is  
allowed to be sent to it. The phone UA might ask the user if it  
should retry and allow higher-resolution.

If the server response does not include a "Content-Resolution"  
header, it is assumed that only one version of the media is  
available.  So only for reponses including the header should the  
browser try to obtain high-resolution media for printouts.

    - Peter Speck

More information about the webkit-dev mailing list