Two Googlers created an API to connect USB devices directly to the Web

Credit: Maurizio Pesce

Two Google engineers have introduced a new API called WebUSB to the World Wide Web Consortium’s Incubator Community Group (W3C WICG) that would allow USB devices to connect to the Web safely.

The API isn’t meant for USB flash drives, but other peripherals like keyboards or various Internet of Things crap gadgets. The process isn’t meant for some sort of advanced file transfer, either; it’s to safely connect hardware to the Web without the need for a dedicated platform.

In their proposal, the Googlers explain their aim:

API hardware manufacturers will have the ability to build cross-platform JavaScript SDKs for their devices. This will be good for the web because, instead of waiting for a new kind of device to be popular enough for browsers to provide a specific API, new and innovative hardware can be built for the web from day one.

The engineers also touch on security. A USB device and a computer trust one another by default, so there has to be a safeguard for your data. To help, the engineers plan to invent a type of Cross-Origin Resource Sharing (CORS) which prevents Webpages from requesting data from anything other than the page you’re visiting.

That means a Webpage couldn’t ever use the USB device to access your computer, or any files that it or the USB device itself may hold.

Luckily, the API was also designed to be backwards compatible, which may allow developers to breathe new life into old peripherals. If you want to check out the full WebUSB codebase, it’s being hosted on GitHub.

via Softpedia

Read next: Redditors claim Axe stole 'Shower Thoughts' subreddit content for new ad

Pssst, hey you!

Do you want to get the sassiest daily tech newsletter every day, in your inbox, for FREE? Of course you do: sign up for Big Spam here.