W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2012

[whatwg] RWD Heaven: if browsers reported device capabilities in a request header

From: Charles Pritchard <chuck@jumis.com>
Date: Tue, 07 Feb 2012 13:34:44 -0800
Message-ID: <4F3198F4.1040000@jumis.com>
On 2/7/2012 1:21 PM, Matthew Wilcox wrote:
> Whether screen-size is a good idea or not comes after.
>
> And, screen size is useful when understood to mean "CSS Pixels".
> Because that's what a browser renders. If a device has a screen 1900px
> CSS px wide, you know you never need send anything larger.

It's getting in the way, and it's certainly been a strong topic.

I know that if a screen is 480px wide that I know nothing. I spent a lot 
of time on work-arounds for DPI issues on mobile and desktop.

Unless you go out and disable zoom, the user can zoom into the image. 
That applies to mobile for sure. I hate it when I can't zoom in on some 
sites. Google news is a prime example.

It also applies to desktop. There are many instances of sites that have 
a downsampled image, which you can then click to get a higher resolution 
version.

It'd be a nasty thing to have to change my system resolution settings 
because someone thought it would be funny to serve me up small versions 
of images based on my browser zoom or screen resolution.

I'm all for exposing data. I had a very public tantrum about 
devicePixelRatio; Microsoft exposes it directly,
WebKit exposes it inadvertently, Mozilla exposes it via CSS selectors 
(needing about 15 lines of css).


While I am for exposing data, I'm just not seeing this idea of exposing 
"all" css media attributes.
But I'll try to bend my mind around it, now that we're over the initial 
hurdle about screen size.

Sure, if you want to have something like this, it's not the end of the 
world:
<style server="viewport-width, media, min-width" 
src="http://server.com/dynamic.css">

That'd result in some kind of header when requesting that style sheet.
It could be used for really nasty purposes if it automatically updated.
Such as, if you set set "width", it might re-request the CSS file every 
time the user resizes the browser.


-Charles
Received on Tuesday, 7 February 2012 13:34:44 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:39 UTC