indexeddb

Which version of webview of android and ios supports indexeddb?

你离开我真会死。 提交于 2019-12-10 19:09:21
问题 I'm developing a hybrid mobile app using cordova. So I'm researching the solutions for offline storage. It seems indexeddb will be my best choice. Now I'm not clear which version of webview of each platform support indexed db. I use can I use to check, but I don't think webview of each platform is listed. Where can I find these information? 回答1: I dunno exactly how works cordova. But i think they re directly using the official webview in each OS. And caniuse.com actually do list the support

Is there a Service Worker startup waitUntil to delay processing fetch?

我怕爱的太早我们不能终老 提交于 2019-12-10 18:45:35
问题 Is it possible to get service workers to wait to begin processing fetch events until asynchronous work completes at service worker startup? I have an app shell with routes defined in data. To install specific route fetch handlers at service worker startup, I need to lookup route data from IndexedDB (asynchronous). Unfortunately, the service worker starts accepting fetch events before the IndexedDB lookup can complete and setup fetch handling for routes. For now, I'm just hardcoding a special

How should an app react when indexedDB is blocked

点点圈 提交于 2019-12-10 18:06:48
问题 I was told in another question about detecting block and unblock events that "A blocked open (or delete) is not canceled, just... blocked. Once unblocked the open (or delete) will proceed." I was wondering how an app should respond to a blocked event then, if it is possible that the path following a successful event will still occur, eventually. If I want my app to respond quickly , and encounter a blocked event, should I cancel the success path? By path, I am referring to the series of

Safari implementation of indexeddb is very slow

无人久伴 提交于 2019-12-10 17:22:16
问题 Apple recently added support for indexeddb in both iOS8 Safari and Safari 7.1 on OSX. I am attempting to use this in a web application that stores about 65,000 records in indexeddb and queries them using some compound indexes. It's working for me, but compared to Chrome's implementation of indexeddb, it's really, really slow. To be specific... a query that takes 2ms against Chrome's indexeddb takes 500ms against Apple's indexedbb. This particular query is using a compound indexeddb index (2

window.mozIndexedDB is null in Firefox 15

一笑奈何 提交于 2019-12-10 17:16:06
问题 I'm trying to run the "Using IndexedDB" sample code on https://developer.mozilla.org/en-US/docs/IndexedDB/Using_IndexedDB Right out of the gate I stumble with the first line of code: window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB; Using Firebug I see that window.indexedDB is undefined as expected for FF 15, window.webkitIndexedDB is undefined as expected (FF isn't webkit) but window.mozIndexedDB is null but not undefined. If it's null that tells me it

IndexedDB User Permissions

六眼飞鱼酱① 提交于 2019-12-10 15:50:54
问题 Good day, all I read on this page [Using IndexedDB]: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB that browser will prompt user to give permission to create indexedDB, and the user may deny permission. See quote below: The most likely problem is that the user decided not to give your web app permission to create a database. One of the main design goals of IndexedDB is to allow large amounts of data to be stored for offline use. (To learn more about how much

How to map mulit-level object to indexedDB for best efficiency

二次信任 提交于 2019-12-10 13:50:23
问题 My question concerns laying out a data structure within indexedDB. I started out building a small web page feature that grew into something more of a web learning tool to now more closely to a stand-alone progressive web application. Using localStorage has worked well but since the tool has grown, the 5MB limit may become a problem for some users; so, there is a need to switch to indexedDB. The application is for desktops only and allows the user to build a portfolio of modules and save the

Indexeddb: search using wildcards

做~自己de王妃 提交于 2019-12-10 13:17:50
问题 I was wondering if it is possible to perform a search on an indexeddb object store using wildcards. It would be handy to find all object with a key beginning with '555' for example 回答1: This is possible out of the box using either compound keys or key fragments. The way keys work in IndexedDB is that you generate a "keyRange" object and pass it to your cursor invocation. The keyrange passes info like "start at A and end at Z, inclusive." By nature, there is partial matching built into this;

How can I access indexedDB synchronously?

自作多情 提交于 2019-12-10 12:43:28
问题 The indexedDB has a spec saying that you can access an indexed database synchronously, but it hasn't been implemented yet. I was just wondering if there is a way to make it synchronous manually, My JavaScript looks like this, var trans = databaseAsync.transaction(["mapTile"], IDBTransaction.READ_WRITE); var store = trans.objectStore("mapTile"); var keyRange = IDBKeyRange.bound(evt.data[0], evt.data[0]); var cursorRequest = store.openCursor(keyRange); // can you put some kind of wait in here?

Can you ever alter the structure of an indexedDB database after it has been opened in firefox?

蹲街弑〆低调 提交于 2019-12-10 11:58:38
问题 var db; var version = 1; var request = indexedDB.open("myDB", version); request.onsuccess(function(e) {db = e.target.result;}); // db.close(); //??? happens async and has no callback var request2 = indexedDB.open("myDB", ++version); request.onsuccess = function() { console.log("success"); }; request.onerror = function() { console.log("error"); }; // called if db existed when page was loaded request.onblocked = function(){console.log("blocked");}; // called on init creation request