Bandwidth Savvy Apps With New W3C API
Written by Kay Ewbank   
Monday, 03 December 2012

An API that will make it possible to write apps that are clever when it comes to bandwidth has reached the W3C's Working Draft stage.

The Network Information API is being worked on by the Device APIs Working Group of the W3C, and has been published as a Working Draft.

The Network Information API provides an interface that your web applications can use to find out how the device the app is running on is connected. The idea is that you’ll be able to create apps that will recognize if the device is running on bandwidth that is limited or expensive, so you can change the way the apps work to behave differently. The examples quoted by the working group in the working draft are:

  • An image viewer showing very low resolution thumbnails when the user has a low bandwidth or a metered connection.

  • A video game loading low textures when the user has a low bandwidth or a metered connection.

  • An email client downloading only headers or even asking the user to download headers when he/she has a low bandwidth or a metered connection.

  • Any app trying to aggressively cache any downloaded asset when the user has a low bandwidth or a metered connection.

The problem is just how this would actually work.

The user agent has to expose two properties: bandwidth and metered, and the working group doesn’t actually agree how this would work in practice. The group points out that monitoring bandwidth would be tricky to keep up-to-date, and that the actual bandwidth level might be unrelated to the actual connection quality that could be affected by the server. The team is considering using more general values such as very slow, fast, very fast.

It’s equally tricky to find out whether the connection is metered or not, as there’s no standard way for the OS to know if the connection is actually metered. The group points out that Android 4.1 and Windows 8 both do have a way to check if the current connection is metered. Android is using a boolean (isActiveNetworkMetered()) while Windows 8 allows the developer to ask for different information (NetworkCostType, ApproachingDataLimit, OverDataLimit, Roaming), so the idea of the API isn’t completely theoretical.

W3Clogo

 

More Information

The Network Information API (Working Draft)

Related Articles

W3C Publishes Push API Draft Specification

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin,  or sign up for our weekly newsletter.

 

blog comments powered by Disqus

 

Banner


Taking The Shake Out Of GoPro
12/08/2014

Microsoft Research has outlined a method for effectively taking the shake out of first person videos and condensing them down so that they are actually interesting.



Keeping Open Source Safe
15/08/2014

While large open source software projects benefit from having thousands of people contributing, that openness also leaves them open to problems, as a recent spate of patches for the Linux kernel shows [ ... ]


More News

Last Updated ( Monday, 03 December 2012 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.