4 ms·
Legitimate reasons to directly access the OS are typically "there isn't a browser API for this yet". We have multiple Open Source browsers now; submit a patch
by JoshTriplett 13y ago
Legitimate reasons to directly access the OS are typically "there isn't a browser API for this yet". We have multiple Open Source browsers now; submit a patch to one or more of them to add a new API, and ideally start working to standardize it. The result will be far better and more secure than a one-off custom plugin to pass through specific OS functionality.
- AnthonyMouse 13y agoIf Firefox had an API that allowed you to do anything the OS allows you to do then there would be no sandbox. If it doesn't then there are things you can't do with the browser API that you could do with direct access to the OS.
- nawitus 13y agoBut the goal is not to do everything that native applications do, but instead provide features to users. Here's an example: lets imagine it's 2005. You have a native application that stores 1 GiB of data to the disk for caching of media assets. Now you would like to reimplement that as a browser app, but there's no browser API for disk access. What's the solution? You could provide a browser API for direct arbitrary disk access, but that's clearly not secure enough. Instead, File API was created with a lot of restrictions compared to the api that the operating system has. If you think it this way, you can go extremely far in replacing native applications. I guess the core problem is that OS APIs were not designed to execute unsafe code, but browser APIs are. Ultimately, there's no application-level feature that couldn't be implemented with a well-designed browser API. In addition, I like it that browsers are creating new APIs relatively slowly. The reason is simple: security is difficult, and there's time to actually think about security issues.
- Paul-ish 13y agoBrowser extensions in Chrome, and particularly in Firefox are very expressive. Things that might have been designed as plugins in the past could be written as extensions.
- throwaway2048 13y agoYes, step right this way to begin the 10 year+ w3c standardization dance, with a high likelyhood that large vendors never implement the functionality anyways. Web standards and the web standardization process are broken. An example is webrtc, which was practically designed for webcam chat, yet this is still completely broken in a cross platform/browser context years after the fact.
- JoshTriplett 13y agoDon't try to standardize it first; work with Mozilla and Chrome, add an experimental API, and then take the resulting API to WHATWG (preferred) or W3C for standardization.