javascript - Chrome 34 confirm message PERSISTENT -


my web site uses persistent storage. http://spinlock.idletime.tk/web/ffmpeg_pnacl/

chrome 33 confirm persistent storage,only 1 time. chrome 34 confirm every time!

chrome 34 bug? or javascript wrong?

(function openfs() { navigator.webkitpersistentstorage.requestquota(1024*1024*100000, function(bytes) {     window.webkitrequestfilesystem(window.persistent, bytes, function(fs) { fs = fs;}, onerror);    }); })(); 

why???

thank you.

my answer

(function openfs() {     navigator.webkitpersistentstorage.queryusageandquota(function(used, remaining) {     if(used+remaining < 1)         navigator.webkitpersistentstorage.requestquota(1024*1024*100000, function(bytes) {         webkitrequestfilesystem(window.persistent,bytes, function(fs) {             fs = fs;}, onerror);});     else              webkitrequestfilesystem(window.persistent,1024*1024*100000, function(fs) {             fs = fs;}, onerror);     }, onerror ); })(); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -