[web-nfc] Allow a NFC tap to load a URL with NFC message payload passed to the page

mfoltzgoogle has just created a new issue for 
https://github.com/w3c/web-nfc:

== Allow a NFC tap to load a URL with NFC message payload passed to 
the page ==
[Rephrasing a discussion during yesterday's F2F]

The museum use case described in [1] would benefit if the web app 
could bootstrap itself with an initial tap on a NFC tag.  The UA would
 read a URL to which the user would be prompted to navigate.   If the 
URL were already loaded, the UA would foreground an existing 
browser/tab (in case there are a series of tags that are "anchors" 
into the same content).

Once the browser navigates to this URL, it would be helpful if the 
page were able to access the other records in the message 
(NFCMessage.data) without a second tap.  This might require a solution
 like adding a `navigator.nfc.referrerMessage` property, similar to 
what is proposed in the Web Bluetooth API [2].

Another variant is to actually read the HTML document from the NFC tag
 and load it in the browser.  This would require careful design to 
ensure that the document is loaded in a secure way (sandboxed/unique 
origin), and some convention for the data payload to let the browser 
know that it should render the content of the tag.  This would allow 
nice applications like being able to retrieve a bus schedule by 
tapping on a tag even if you don't have Internet connectivity.

[1] 
https://w3c.github.io/web-nfc/use-cases.html#reading-generic-information-in-a-museum
[2] https://github.com/WebBluetoothCG/web-bluetooth/issues/163


See https://github.com/w3c/web-nfc/issues/78

Received on Wednesday, 28 October 2015 00:03:07 UTC