Questions tagged [localforage]

Mozilla's asynchronous offline storage.

localForage is a JavaScript library that improves the offline experience of your web app by using asynchronous storage (via IndexedDB or WebSQL where available) with a simple, localStorage-like API.

localForage uses localStorage in browsers with no IndexedDB or WebSQL support. Asynchronous storage is available in the current versions of all major browsers: Chrome, Firefox, IE, and Safari (including Safari Mobile). See below for detailed compatibility info.

149 questions
14
votes
2 answers

What is the difference between localForage and localStorage

As I was looking to add an offline mode to an application, I dumped into localForage, which seems to be an interesting way to do so. Still, I didn't get the difference it has with a simple localStorage API. Can anyone help me with that ?
Ismail H
  • 4,226
  • 2
  • 38
  • 61
13
votes
1 answer

Append to array in localForage

I am using localForage to store some data on a website to make it offline. I would like to have one key and append to the value / array. So far I can only figure how to retrieve the entire key/value from storage, then append and set the entire…
Karl Stulik
  • 961
  • 1
  • 12
  • 24
11
votes
2 answers

IndexedDB size keeps growing even though data saved doesn't change

I am using Redux Persist and LocalForage in my web application. I have a series of actions that are fired upon login that update some data about the user. The IndexedDB size after all actions are fired and the data is saved in the JSON format on…
11
votes
1 answer

Using Angular and localForage with webpack

I'm trying to gather angular, localForage and angular-localForage with webpack. My require file looks like this, // Angular…
mariowise
  • 2,167
  • 2
  • 21
  • 34
8
votes
1 answer

How to get axios-cache-adapter to cache file downloads with responseType blob?

For some reason axios-cache-adapter is not caching GET requests for file downloads which I believe is due to setting responseType: 'blob' (as I don't have caching issues on other requests that don't require this field be set as such) which is…
MShakeG
  • 391
  • 7
  • 45
7
votes
2 answers

Update one item with localforage

I've a local indexeddb like this: // Unlike localStorage, you can store non-strings. localforage.setItem('123456', { //0 - Ref cli ref_cli: '4720271', //1 - Offre client offre_cli: 'Offre 3', //2 - Date RDV date_rdv: '22/09/2015', //3…
Romain
  • 111
  • 1
  • 5
6
votes
1 answer

Error loading Blob to img in Safari (WebKitBlobResource error 1.)

I am trying to save a blob to localforage and then retrieve it and display it. It works fine for a while, but after a couple of page refreshes or browser closes I get an error on some of the blobs. The complete error is as follows: Failed to load…
user1763510
  • 1,070
  • 1
  • 15
  • 28
6
votes
1 answer

are indexeddb/localforage reads resolved from a synchronous buffer?

Taking the following pseudo code localforageStore.setItem('foo', 'bar') .then(console.log('foo is persisted to disk')); localforageStore.getItem('foo') .then(v => console.info('foo is '+v)); // A, B or C? Is the console.info:- A.…
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
5
votes
2 answers

How do I assign a variable from localForage as I do in localStorage?

Please help me with the following. I have been converting my AngularJS application from localStorage to localForage. throughout my application I was assigning the localStorage value like…
Brent R
  • 149
  • 3
  • 10
4
votes
3 answers

How to use localForage synchronously

I have a Cordova mobile app that stores offline data in localStorage. Recently users started getting QUOTA_EXCEEDED_ERR error because localStorage has 5MB limit. I decided to use "localForage" framework, but I noticed that it works asynchronously.…
user2412672
  • 1,459
  • 3
  • 20
  • 36
4
votes
1 answer

localForage storage capacity

I'm using localForage in my Cordova application. I want to know the size of the localforage. Basically it is mentioned as 5mb limit. I will have more than 100mb data in my mobile application. var DefaultConfig = { description: '', driver:…
4
votes
1 answer

What's the best fallback for indexedDB and localstorage on Safari private mode

I'm using localforage to persist the state for a react app. However, It's still not perfect. Because in safari private mode, the state will be removed after refreshing the page. What is the fallback for this situation?
Bruce Mu
  • 893
  • 11
  • 22
4
votes
0 answers

TypeError: Cannot read property 'config' of undefined - angularjs localforage

I am tryng the basic example of angular localforage from this link but i got below error: TypeError: Cannot read property 'config' of undefined at new LocalForageInstance (angular-localForage.js:51) at $get (angular-localForage.js:460) …
3
votes
0 answers

index.js depends on 'localforage'. CommonJS or AMD dependencies can cause optimization bailouts

I got this warning, but I dont understand why 'localforage' depends on CommonJS. I had googled for few days, but I can't find any solution that fit with my problems. WARNING C:\xxx\node_modules\@ionic\storage\dist\esm\index.js depends on…
3
votes
0 answers

LocalForage.clear() is not clear my web database

I'm making counter using react-redux, redux-presist and localForage. and trying to clear my storage to set cnt = 0; when user come in so it will begin to count from 0 to n when user come in my website, but clear() is not working any…
JillAndMe
  • 3,989
  • 4
  • 30
  • 57
1
2 3
9 10