ios - Is there a way to access the files of application cache of safari using javascript? -



ios - Is there a way to access the files of application cache of safari using javascript? -

i looked @ options access files cached in browser, not one. thing ended counting number of files beingness cached listening caching events.

here code:

var cachestatusvalues = []; cachestatusvalues[0] = 'uncached'; cachestatusvalues[1] = 'idle'; cachestatusvalues[2] = 'checking'; cachestatusvalues[3] = 'downloading'; cachestatusvalues[4] = 'updateready'; cachestatusvalues[5] = 'obsolete'; var cache = window.applicationcache; cache.addeventlistener('cached', logevent, false); cache.addeventlistener('checking', logevent, false); cache.addeventlistener('downloading', logevent, false); cache.addeventlistener('error', logevent, false); cache.addeventlistener('noupdate', logevent, false); cache.addeventlistener('obsolete', logevent, false); cache.addeventlistener('progress', logevent, false); cache.addeventlistener('updateready', logevent, false); var count=0; function logevent(e) { var online, status, type, message; online = (navigator.online) ? 'yes' : 'no'; status = cachestatusvalues[cache.status]; type = e.type; message = 'online: ' + online; message+= ', event: ' + type; message+= ', status: ' + status; if (type == 'error' && navigator.online) { message+= ' (prolly syntax error in manifest)'; } console.log(message); if(type=='progress') { count++; } if(type=='cached') { //count-1 bcoz "progress" events starts 0 alert("count of files cached: "+count-1); //alert(cache.mozitems()); } }

i not find way traverse cached files. on searching in net got answers this, "there no direct javascript interface checking contents of browser's cache. security hazard if able probe contents of users' file system. " in http://www.codestyle.org/javascript/faq-browser.shtml.

but still wondering if there can possible way using javascript, preferably or other language supported ios. of great help if solution posted in thread. in advance.

javascript ios html5 caching

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -