A question about the discussions so far

Pardon me if this has already been addressed but I couldn't find any
reference to this from a Google search so maybe its new.

The way I see the responsive images problem is one of responsibilities. The
developer knows what he wants to show but only the user agent knows what
its capabilities are. Ideally we would give the user agent the ability to
request the correct representation of a resource based on a context only it
knows (hardware, network, physical location...).

In general it seems that most solutions put the onus on the developer to
make optimal decisions about what representations to use when. But I think
that we're going to run into the unavoidable problem of how do you
efficiently declare representations for every possible situation? There are
too many different variables to consider to do it justice.

Great, the new guy is telling us its a hard problem. Someone get out the
cluebat.

What my question is, has anyone considered an HTTP solution?

Specifically, it seems to me that you could use the "300 Multiple Choices"
response and then document a new mime type that specifies the collection of
representations for this resource and relevant metadata (dimensions, file
size, format, quality, location, geographic location?). The user agent can
then look at the metadata and decide which representation of the resource
to use and then request that? So the UA could choose the high pixel, low
quality small file size representation since is on a mobile network and has
a high dpi screen (for example), but when it gets on WIFI it gets the
bigger one. This is, again, not perfect since its hard for the UA to know
how the resource will be used, but it can make more intelligent decisions
in many cases. (and maybe we can use the equivalent of http's q property to
indicate preferences, Location header aside)

The value of this idea would seem to be that any type of resource could be
handled this way (images, video, audio, code??) and it could be used
anywhere (html, css, and js) without modifying them since its in the layer
below. Its not ideal because you need a new mime type, although, the UAs
could explicitly add it to their accepts list and servers could use that
for content negotiation and not break existing browsers. It also requires
extra HTTP requests. This can be mitigated by embedding the entity in the
page using a data uri (i realize this departs from the model somewhat)
based on content negotiation.

One could even create something like mod_responsive on the server side that
used some convention to automatically handle this (say, create a folder
called 'myfile.responsive' and the contents of the folder become the
different representations of myfile) which would take away the complexity
of this from content creators.

I'm sure that there is something inherently flawed in my thinking, but I
have met very few people who think too hard about HTTP (we all worked at
that place where we 'broke the web' in one way or another) so I'm hoping
that maybe there is something here to investigate. Not being a browser guy,
I can't say much more than, "did anyone consider"?

--
Adam van den Hoven
LittleFyr Communciations Inc.

Received on Thursday, 27 June 2013 04:30:42 UTC