4 ms·
Why couldn't Firefox use SQLite?
by lt 11y ago
Why couldn't Firefox use SQLite?
- pfraze 11y agoThere's a W3C rule, that each browser needs their own implementation. If everybody uses the same code, it's considered a Monoculture security risk [1]. 1. https://www.schneier.com/blog/archives/2010/12/software_monocu.html https://www.schneier.com/blog/archives/2010/12/software_mono...
- andrewstuart2 11y agoThanks, that's a great article. May be worth a repost since it's been 5 years since it was last posted (according to my cursory searches). Somebody posted it: https://news.ycombinator.com/item?id=10199163 https://news.ycombinator.com/item?id=10199163
- frandroid 11y agoffs
- donbox 11y agoI wonder then how come so many browsers are allowed to be Webkit based
- teraflop 11y agoBrowsers are "allowed" to do whatever they want, but the W3C is very unlikely to endorse some feature as a standard if Webkit is the only codebase that intends to implement it. Which is basically what happened with WebSQL.
- aikah 11y agoI ask myself the same thing regarding the file system API. It's like Mozilla and co are against serious offline apps that would have taken advantage of these 2 features heavily. And no , IndexedDB is not a replacement for these.
- Touche 11y agoThey could, but "use SQLite" is not a spec.
- pornel 11y agoIf all implementations use the same code, then they have the same bugs and quirks (and sqlite, being very lite on the SQL standard, has many quirks). When all implementations have the same bugs/quirks then websites can end up (inadvertently) relying on these bugs, and this makes any future fixes or upgrades to the underlying sqlite very risky (almost guaranteed to break some sites on the net). It's the situation IE6-only intranet sites ended up with: depending on every dark corner of a particular implementation, and then couldn't even work with IE7/8/9. So similarly the WebSQL standard would de-facto freeze at some sqlite3 version, and wouldn't be able to upgrade to sqlite4/5/6 until all sites on the web are compatible, which won't happen (and we'd have "quirks modes" for websql versions, etc.) The whole mess is largely avoided when there are multiple independent implementations. When each implementation has different bugs, then developers will notice that their code works in one browser, but not another, and see what's a bug and what is a feature.