PhoneGap disable caching

后端 未结 1 824
渐次进展
渐次进展 2020-12-17 03:34

I\'ve made a html file where I\'m using JavaScript to view a list of table from a textfile. The issue here is that every time I enter the page in PhoneGap on my tablet,

相关标签:
1条回答
  • 2020-12-17 04:29

    I would suggest you to use the following plugin :

    https://github.com/moderna/cordova-plugin-cache

    document.addEventListener('deviceready', onDeviceReady);
    function onDeviceReady()
    {
        var success = function(status) {
            alert('Message: ' + status);
        }
    
        var error = function(status) {
            alert('Error: ' + status);
        }
    
        window.cache.clear( success, error );
    }
    

    This will clear the cache of your application everytime you launch it.

    You can comment alerts in the callbacks.

    0 讨论(0)
提交回复
热议问题