Search code examples
javascriptjqueryindexeddbpolyfills

unable to make indexeddb work in android 4.2


i was devlopping an offline store using indexeddb it work very nice with android 4.4 sadnly when i tested it with a device < 4.4 it doesnt work i was serching in the net i fond that i must use a polyfill,i add this to my exixting project

    <script src="js/jquery.indexeddb.js"></script>
    <script src="js/IndexedDBShim.js"></script>
     <script src="js/IndexedDBShim.min.js"></script> 
     <script src="js/jquery.indexeddb.min.js"></script>  

but nothing work and i had 2 error

Uncaught Error: SECURITY_ERR: DOM Exception 18 at file:///android_asset/www/js/IndexedDBShim.min.js:2 and Uncaught ReferenceError: jQuery is not defined atfile:///android_asset/www/js/jquery.indexeddb.js:522 Can any one help me since im really blocked


Solution

  • It seems like jQuery is not included. At the very top of the file, make sure to include the jQuery file and also add it to your application cache manifest (if you're using one, which I'm assuming you are since you're using indexedDB). You can get the jQuery files that you should include here: http://jquery.com/download/