
Intent Tag Has Landed In Webkit - kinlan
http://trac.webkit.org/changeset/116384
======
jmitcheson
The combinations of web intents and Google's GDrive implementation / Dropbox
seem interesting. I could link a file with a web intent, you use your Chrome
App or similar to edit it, save it back to your Dropbox / drive - then your
editor makes you another link which you can share with others to start the
process over again.

When you think about it this seems to align well with the original
philosophies of the web. Exciting times.

~~~
MatthewPhillips
So what if I have 5 apps that can edit the file type. Do I have to choose
which app I want to use, every time? That is the way it works on Android, and
it is bad UX.

~~~
kinlan
It depends. The UI in Chrome doesn't yet have a defaulting mechanism, but the
intention is to have this so that you can set your preferred app to use and
have it work seamlessly.

~~~
MatthewPhillips
Defaulting is not enough. It has to be easy to switch to another. On my
Android phone I have 5 web browsers installed. If I add a bookmark to the
homescreen it asks me which web browser I want to use to open it. Every time I
click on it.

I could, as you suggest, set a default, but if I do that then that browser
owns all of my links and the only way to change it is to hunt down the setting
to disable the default (which is buried in the settings UI I suppose).

So I live with the (extreme annoyance) of clicking on a link _within the
browser_ that then prompts me which browser I'd like to use to open it.

Getting the UX right on this is by far the most important part of the project.

~~~
ivasilov
I'm annoyed by the exact same thing. Chrome Beta is good, but it is still a
beta. For some sites, I've found the built-in browser to be better. A proper
UX solution, in my opinion, would be using a 3-4 seconds dialog ("Opening with
Chrome") with a Change button. That way, you can change the default app at the
moment you notice it. Of course, it comes with a delay, so it wouldn't work
well for others.

~~~
untog
A 3-4 second delay on every app launch? No way.

~~~
abraham
Replacing the currently indefinite delay with a 3-4 second one sounds like an
improvement.

~~~
untog
That only works if you launch the wrong app every time. Extremely unlikely.

------
SquareWheel
I really want Web Intents to take off. It's like assigning programs to certain
file extensions, but instead assigning intents to web services. So you could
take a photo, edit the image, and share it to your social network of choice.
The websites would use a common API, they don't need to program exceptions for
each-other like we do with iOS apps. Android does it a lot better, but this
could really work on the web.

Hopefully Google and Mozilla will put enough resources behind this that it
becomes standardized on, and maybe even Microsoft will get on board.

Apple, well, probably not.

~~~
marcusf
Not sure why the Apple punch was necessary? You do see that this is a commit
on WebKit, right?

~~~
jahmed
Well they still haven't enabled HTML form file upload which makes uploading
through a web app difficult if not impossible.

~~~
marcusf
This discussion isn't wholly centered on mobile though - the OP mentions
Mozzila, Msft, Google and Apple - I think we're equally talking desktop
browsers.

And while I agree that file upload is a major, glaring omission and a constant
source of pain, I still hope it's not permanent.

~~~
jahmed
The difference between desktop and mobile is arbitrary. A cell phone is a very
small computer that also has specialized hardware for making phone calls
(which my laptop also has). Yes there may be some considerations for space and
workflow on different devices but RFC 1867 has been around for almost 20
years. Its not something new and revolutionary, its something that most people
expect to do from within a browser.

------
fpp
Similar or related initiatives:

Mozilla web apps / web activities:
<https://people.mozilla.com/~anarayanan/webapps.html>

[http://blog.mozilla.org/labs/2011/07/web-apps-update-
experim...](http://blog.mozilla.org/labs/2011/07/web-apps-update-experiments-
in-web-activities-app-discovery/)

A overview of currently envisioned use cases:
<http://usecases.webintents.org/>

Activity base schema (IBM, SAY, Facebook, Six Apart, Google, Microsoft,
MySpace): <http://activitystrea.ms/head/activity-schema.html>

Web intents at w3c: [http://dvcs.w3.org/hg/web-intents/raw-
file/tip/spec/Overview...](http://dvcs.w3.org/hg/web-intents/raw-
file/tip/spec/Overview.html)

------
VMG
more info: <http://webintents.org/>

_Web Intents is a framework for client-side service discovery and inter-
application communication. Services register their intention to be able to
handle an action on the user's behalf._

------
casca
This could be a good push for interoperability, but it is more likely to end
up being another vector for inadvertent data disclosure as the majority of
people just click "Yes" when asked for permission.

~~~
joshsharp
This is not a background process but a way for a user to actively share data
between web apps - it's a "push" action the user must instigate, not a "pull"
from the third-party wanting access to the data. There is no more "inadvertent
data disclosure" than when someone knowingly tweets a link to a file in their
public dropbox, or uploads an image to Facebook.

------
drpancake
Interesting that the JavaScript interface is very similar to Android's own
intents. From the example in the spec:

    
    
      var intent = new Intent("http://webintents.org/edit",
                              "text/uri-list;type=image/jpeg",
                              getImageDataURI(...));
      navigator.startActivity(intent, imageEdited);
    

[http://dvcs.w3.org/hg/web-intents/raw-
file/tip/spec/Overview...](http://dvcs.w3.org/hg/web-intents/raw-
file/tip/spec/Overview.html#example)

You'll notice that all of the editors are Googlers.

~~~
kinlan
There is also a lot of active contribution from a lot of other people and
companies too on the list <http://lists.w3.org/Archives/Public/public-web-
intents/>

------
emehrkay
Great explanation here for those of us who didnt quite understand at first

[http://dvcs.w3.org/hg/web-intents/raw-
file/tip/spec/Overview...](http://dvcs.w3.org/hg/web-intents/raw-
file/tip/spec/Overview.html#example)

What are the security concerns?

------
Kilimanjaro
Hmm, why not just add an action attribute to the anchor tag?

    
    
        <a href="image.png" action="edit">
        <a href="myblog.feed" action="subscribe">
        <a href="rickroll.vid" action="view" target="_blank">

~~~
Kilimanjaro
Or just make it easier for the user to register protocols in the browser like:

    
    
        <a href="edit:mycat.png">
        <a href="subscribe:myblog.feed">
        <a href="view:rickroll.vid" target="_blank">
    

Browser vendors get together and implement some basic protocols and a simple
UI to change them.

~~~
kinlan
Because protocols are not actions and also what your describe provides no way
for return data to be handled. Likewise for pulling in data in to your app.

Note though that this is something we also considering, we will be bringing in
RPH and RCH into the intent declaration.

The intent tag is about the declaration of abilities that your app has so in
your model this would also be possible.

~~~
Kilimanjaro
We've been doing href="mailto:self@example.com" for centuries and it has
worked very well.

Good point about returning data.

~~~
kinlan
we will definitely be supporting mailto etc using all the existing methods.

------
ilaksh
This reminds me a little of OLE (but for the web). Not the same thing but a
few similarities.

Seems like something you could probably already do with like an iframe and
postMessage. There is a JavaScript based implementation, maybe that's how they
do it.

<http://www.webintents.org/>

~~~
kinlan
That is exactly how the shim works :)

------
budgetperson
How are web intents different from the Semantic Web? The only differences in
ideology I can find right now is the prevalence of actions over data. But
still, to what degree are these concepts similar?

~~~
andybak
I might be dim but I fail to see any connection at all.

One is about metadata and machine readability whilst the other is about
linking web app capabilities.

