Web Intents: the future of web apps

This article first appeared in issue 229 of .net magazine – the world's best-selling magazine for web designers and developers.

Like. Read Later. +1. Tweet. Tumblr. StumbleUpon. For the last few years, little chiclet buttons have been spreading like measles across the web, appearing and vanishing as new tools and services rise and fall in popularity. The popular ShareThis button, which offers site owners the chance to at least corral all these social services into one pop-up box, currently offers over 120 potential destinations – and while nobody ever actually lists them all outright, it’s often hard to tell exactly who all the options are helping.

It’s a problem in need of fixing, and one that both Google and Mozilla have solutions in the works to handle – Web Intents and Web Actions/Activities respectively. Their executions vary, but the basic goal is the same: to move away from the site/app creator having to link to specific services to get things done, in favour of simply enabling them to provide verbs that the browser can handle on a user-by-user basis.

What would this mean in practice? Well, for example: at the moment, there are many different bookmarking tools, with two of the most popular being Delicious and Pinboard. To integrate a bookmark button on the end of an article, the site owner has to add two different chunks of code. In a Web Intents/Actions world this would simply become one ‘Bookmark This’ button. When the user clicks it, their browser sees the verb, consults its list of registered services, and hands over the data.

That’s only the simplest possible scenario, though. What stops Web Intents/Actions being a glorified ‘mailto: link’ is that they’re capable of far more, including two-way interaction that make them suitable for full web applications as well as simply chiclet replacements. Current Web Intents specifications handle the verbs Discover, Share, Edit, View, Pick, Subscribe and Save. With very little coding, for example, you can both send an image to an editor and receive the touched-up version back, just as easily as pulling information like contact details out of an external address book and into a specific form – all without a single custom API call or even knowing what the second party actually is.

There is, of course, more subtlety to it than this. Just as Mac and Windows deal with image files based on their type rather than simply files and images, so too can apps specify formats and datatypes. A web based image editor, for example, can get involved when dealing with a JPEG, while politely staying out of the way of PNGs or MP3. In the event of multiple registered clients and services being able to handle a request, the browser simply displays a menu for the user to choose which one they want to use. Assuming proper implementation, the same scrap of code will work for all of them.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.