Web NFC provides sites the ability to read and write to NFC tags when they are in close proximity to the user's device (usually 5-10 cm, 2-4 inches).
The current scope is limited to NFC Data Exchange Format (NDEF), a standardized and lightweight binary message format that works across different tag formats, because the security properties of reading and writing NDEF data are more easily quantifiable. Low-level I/O operations (e.g. ISO-DEP, NFC-A/B, NFC-F) and Host-based Card Emulation (HCE) are not supported.
Web NFC is only available to top-level frames and secure browsing contexts (HTTPS only). Origins must first request the "nfc" permission while handling a user gesture (e.g a button click). 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.
The combination of a user-initiated permission prompt and real-world, physical movement of bringing the device over a target NFC tag mirrors the chooser pattern found in the other file and device-access APIs.
The functionality currently available behind a flag at chrome://flags/#experimental-web-platform-features represents a minimum-viable-product for this API.
The Security and Privacy section has been updated based on TAG review feedback.
Link to origin trial feedback summary
Interoperability and Compatibility
Gecko: Negative (https://github.com/mozilla/standards-positions/issues/238)
WebKit: Negative (https://lists.webkit.org/pipermail/webkit-dev/2020-January/031007.html)
Web developers: Strongly positive over the years (https://github.com/w3c/web-nfc/issues/556)
Exposing DevTools debugging support for device-access APIs (Web NFC included) is discussed at https://bugs.chromium.org/p/chromium/issues/detail?id=1142566. For now, affordable NFC tags are required to debug Web NFC.
Is this feature fully tested by web-platform-tests?
Link to entry on the Chrome Platform Status
Links to previous Intent discussionsIntent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/dIbUdDU9a6E/discussion
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5%2BUzRjXLLsJSNmDGKj3sfN0qYpVn3MfU2AX1yqjxeRe%2BA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/ec5d8db2-ce66-4650-a5ee-db21ce22a127n%40chromium.org.