Search code examples
httpmobilewebstandardsbandwidth

Is there a HTTP Request header that indicates that browser wants a low-bandwidth or low-power version of the webpage?


Recently, I was solving the problem of disabling a background video if the user was on a mobile device. Not only were the solutions very hacky, but they weren't even the right solutions. Instead of checking whether the device was a mobile, what I really wanted was to know whether the device prefers a low-bandwidth, low-battery usage version of the page.

It seems like this is a recurring problem: Don't send retina images for a low-res phone, Don't show HD videos on a low-bandwidth connection, Don't use highly-detailed textures while playing a game etc. Also, even for the same device, these preferences pay change with time - say when the mobile has a wi-fi connection and it can handle more bandwidth or the mobile is plugged-in so that battery usage is less of a concern while playing a WebGL-based game.

So, I think the browser should indicate such preferences to the server with each request. The browser has the best information at all times. Relying on User-Agent detection seems inappropriate because it remains the same in both the above cases - when the connection type or power status changes.

Is there any web standard, a request header perhaps, that indicates browser's preferences like the above? Are there plans to develop such a standard?


Solution

  • This video by Brad Frost, as well as his blog contain heaps of information on this topic.

    The short answer to your question: no. But for further reference, in this question are a number of methods you could try.