The usb feature controls whether the current document is allowed to use the WebUSB API.

If disabled in a document, then calls to the getDevices() should return a promise which rejects with a SecurityError DOMException.

How to apply this policy

Send the following HTTP header to control the usb policy, and disallow it on all origins:

Feature-Policy: usb 'none'

Does it work?

Currently Firefox, and Chromium based browsers, such as Google Chrome, Samsung Internet, and Opera, are the only user-agents to support Feature Policy. The minimum version that correctly recognises the usb policy is:

Mozilla Firefox

Not supported

Google Chrome


Microsoft Edge

Not supported

Apple Safari

Not supported