Chrome browser adds support for reading and writing NFC tags

Smartphone tapping NFC enabled cards
WEB NFC: Developers will be able to let websites include support for NFC tag reading and writing

The next version of the Chrome web browser for Android will include support for NFC tags, making it possible for developers to integrate tag reading, writing and data exchange directly into websites and web apps to improve the user experience and add new functionality — without the need for a user to download an app.

The new Web NFC framework forms part of Chrome 81, which was released in beta for Android, Chrome OS, Linux, macOS and Windows last week.

It will allow users to interact with NFC tags straight from their browser, enabling websites to read, manipulate and update information held on the tag.

Until now, users without a dedicated app could read tags using native operating system support, and this might open a browser session to take them to a particular URL.

The new model means data could be read from and written to an NFC tag without requiring network access, or without the need for the information to be stored in the cloud, bringing to web-based apps the same capabilities that mobile apps have enjoyed for some time.

New framework

“Web NFC provides sites [with] the ability to read and write to NFC tags when they are in close proximity to the user’s device (usually 5-10cm, 2-4in),” Google’s François Beaufort explains in an in-depth introduction to the new framework.

“The current scope is limited to NFC data exchange format (NDEF), a lightweight binary message format that works across different tag formats.

“Web NFC is limited to NDEF because the security properties of reading and writing NDEF data are more easily quantifiable. Low-level I/O operations (eg ISO-DEP, NFC-A/B, NFC-F) and host-based card emulation (HCE) are not supported.”

“Web NFC is only available to top-level, secure browsing contexts, and origins must first request the ‘nfc’ permission while handling a user gesture,” the Web NFC developers explain.

“To then perform a read or write, the web page must be visible when the user touches an NFC tag with their device. The browser uses haptic feedback to indicate a tap.

“Access to the NFC radio is blocked if the display is off or the device is locked. For backgrounded web pages, receiving and pushing NFC content are suspended.”

Use cases

Example use cases, Beaufort suggests, include:

  • Museums and art galleries can display additional information about an exhibit when the user touches their device to an NFC card nearby.
  • Inventory management sites can read or write data to the NFC tag on a container to update information on its contents.
  • Conference sites can use it to scan NFC badges during an event.
  • Sites can use it for sharing initial secrets needed for device or service provisioning scenarios and to deploy configuration data in operational mode.

“Web NFC will be available on Android as an origin trial in Chrome 81. The origin trial is expected to end in Chrome 84,” Beaufort adds.

“Origin trials allow you to try new features and give feedback on their usability, practicality and effectiveness to the web standards community.”

Next: Visit the NFCW Expo to find new suppliers and solutions