HTML5’s networking API - let the lunacy begin!

I was reading about the current draft specification for HTML 5 today and was slightly surprised by what I saw in there. There is also a nice page that explains the key differences between HTML 4 and HTML 5 that is good for an overview.

HTML 5 certainly looks like it has some really nice new features - for example Forms 2.0 offers some much needed new input widgets such as a date picker and client-side validation of things like email address, and some really nice looking new semantic markup tags such as <article>, <nav>, and new link type for anchors such as “feed”, “author”, and “license” for example that will inch us ever closer to the ideal of the semantic web.

And then there is the neat addition of a client-side SQL database for storing name-value pairs - kind of like a super-cookie. From a developer’s perspective this sounds great, but I just know that the “security industry” is going to have kittens over this considering how they treat cookies today…

But what really caught my eye was what has been fairly innocuously named “Network API” in a very low-key manner. Ok - so currently browsers offer us the XMLHttpRequest object to play with, but HTML5 goes way beyond this. Ever wanted your web page to send UDP broadcast packets over your local network? With HTML5 you can! Ever wanted a webpage you are visiting to listen for and receive unsolicited messages when you visit it? With HTML5 you can! Ever wanted a web page to try connecting to your phone using bluetooth? With HTML5 you can! Are we about to enter the age of automated web-page spam? This sort of functionality really opens up a whole new avenue for cross-site scripting enthusiasts to explore too.

Dont get me wrong here: although I think this high-level networking capability in the newest HTML5 draft sits kind of awkwardly in what is after all supposed to be a hypertext markup language, I’m actually really excited at the possibilities this will give us. But clearly I am not alone in my concerns - one of the editors of the draft left the following comment for the TCP/IP broadcast:

Should we drop this altogether? Letting people fill the local network with garbage seems unwise.

Or, as someone I was talking to about it today put it in a possibly more succinct way:

someone’s seriously lost the plot

I certainly agree with both points…I doubt we are alone… Maybe we’ll never actually see this once HTML5 is ready for release, but it will be interesting to see how this develops!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.