4 ms·
If 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 w
by AnthonyMouse 13y ago
If 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.