Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova / PhoneGap Browser Cache Size

I'm developing a Cordova app that uses the browser functionality to display an online site (ie. not the local www/ content).

Is it at all possible to control how much data is cached by the app? Heck, is it even possible to see if things are being cached? I'm not sure if the app is caching anything.

Ideally I would like to give it a maximum cache size (eg. 50mb) and whenever it is reached, Cordova automatically removes old files and caches new files.

like image 582
Phil Avatar asked Oct 29 '22 18:10

Phil


1 Answers

I don't believe there is any way to have direct control over this through JavaScript. The rules for browser cache are enforced by the browser of the device. To make matters worse, on iOS the cache could get cleared anytime by the OS. Try looking here for some attempts which have been done for iOS.

like image 120
johnborges Avatar answered Dec 29 '22 13:12

johnborges