4 ms·
Another requirement is more reliable browser-side storage. IndexedDB is too slow (an order of magnitude slower than SQLite) and too high-level (with consequenc
by jorangreef 15y ago
Another requirement is more reliable browser-side storage.
IndexedDB is too slow (an order of magnitude slower than SQLite) and too high-level (with consequences for those who want to handle index migrations or index multiple values).
WebSQL (SQLite) needs to be supported by Firefox so that the web can have two viable storage options, not just IndexedDB. LocalStorage does not count since it is limited to 10mb.
Furthermore, Chrome needs to offer real permission choices to users who want it. At the moment there is no way for an app to be granted storage quotas unless it registers with the Chrome web store.
All the browsers need to come together on this:
1. SQLite must be in all the browsers (at least until IDB proves itself apart from political support from Mozilla). SQLite is probably the most widely-deployed embedded database and IDB is a far cry away.
2. Users must be able to grant storage quotas to web apps directly (without requiring that they be installed through some web store).
This will only happen if we the developers start to get active on these issues and stop assuming that the W3C committee will get everything right without our involvement.
- AffableSpatula 15y agomany apps could get by using a combination of LocalStorage (for storing un-synced data generated by the user offline) and this caching strategy (for storing all of the synced data locally). It's not SQL, but it likely covers a decent amount of use cases.
- jorangreef 15y agoLocalStorage only gives you 10mb. If your user is offline for a week or two you will run into problems. Further, if your user wants all their data with them how would you explain that they can only have 10mb of it? Again, it's not SQL that we need, but a reliable storage mechanism that scales to gigabytes of browser-side data. SQLite is a reliable storage mechanism, interface issues and advantages of SQL aside.
- AffableSpatula 15y agoYep, agreed, some apps could easily generate more than 10mb in a couple of weeks. It's definitely an issue. Users could take all their data with them following this proposal since, provided the Cache-Storage was high enough, data that is pushed up to the online web app could be served back to the client (as json data, a web page, etc.) and stored in the web cache like any other type of asset
- arethuza 15y agoA synchronous interface to SQLite would be nice as well - I really didn't enjoy using the current asynchronous interface. (I think this might have been part of the original spec. but hasn't been implemented).
- paulirish 15y agoStorage quota management is coming out in Chrome 13. You'll like it. https://groups.google.com/a/chromium.org/group/chromium-html5/msg/5261d24266ba4366 https://groups.google.com/a/chromium.org/group/chromium-html...
- jorangreef 15y agoThat's good news.