Comments (5)
I'm looking to deal with a high volume of data (50,000 - 100,000 records or more). I know WebSQL could handle it - but I'm not so sure about IndexedDB, LocalStorage, or GlobalStorage (certainly not cookies).
These are the limits for the different storage mechanisms:
localStorage
5000KB across browsers
indexedDB
By default in Firefox 4, a site can use up to 50MB of IndexedDB storage. If it tries to use more than 50MB, Firefox will ask the user for permission: http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js#101
In Firefox for mobile devices (Google Android and Nokia Maemo), Firefox will ask for permission if a site tries to use more than 5MB: http://mxr.mozilla.org/mozilla-central/source/mobile/app/mobile.js#571
webSQL
Not sure, some people report that there's a hard limit of 5 MB, but I've read elsewhere it is 50 MB. Chrome will ask the user for permission to use over 5MB.
cookies
4000KB+ depending on the browser
I ran a test and was able to get 20,000 records to store... but sometimes it seems hard to tell which storage method is active in Chrome and firefox doesn't seem to have a way to let you peek into the datastore.
Sticky uses the first available storage adapter in the order specified by the adapters
option. adapters
defaults to ['localStorage', 'indexedDB', 'webSQL', 'cookie']
.
One other thing I found was that removeall did seem to fail in chrome (despite a callback of true)... so I'm not sure what I was doing wrong.
I'm working on writing tests for Sticky now. I'll be done soon. The tests will catch any bugs like this.
from sticky.
Local Storage:
Can the localStorage be expanded upon in any browser?
indexedDB:
What about Chrome? Does it work the same way as FF?
webSQL:
What about Mobile Safari and android?
I'm working on a layer above yours that selectively would decide if there's a connection available and when to update from online based on that... What you've got here is great and I can't wait to see how far it goes.
from sticky.
localStorage can't be expanded in any browser. Chrome's indexedDB implementation may differ from Firefox since both are incomplete.
webSQL Mobile Safari is 5MB IIRC.
from sticky.
Hm... So i think I need to reconfigure my storage defaults to WebSQL (to allow chrome and my Rhoelements environment to expand to the necessary size), then IndexedDB - Can I just remove the rest?
LocalStorage is almost useless to me because if we store lots of data - we can't grow the database larger and we'd never use cookies I don't think...
from sticky.
In that case, specify that indexedDB and webSQL are preferred adapters like so:
var store = new StickyStore({
adapters: ['indexedDB', 'webSQL, 'localStorage']
});
from sticky.
Related Issues (14)
- StickyStore.get should support a 'default' argument HOT 1
- indexeddb future compat
- IndexedDB without serialization HOT 1
- Defining adapters causes error... HOT 10
- Impossible to save falsy values (empty string, number 0) HOT 1
- List/getAll function HOT 1
- Different users and init HOT 1
- Other mobile browser are supported? HOT 1
- 数据同步 HOT 2
- What happens when storage is full? HOT 6
- Performance of memory cache HOT 1
- Error on FireFox10 HOT 3
- tests? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sticky.