0

I have an android application (in dev), which while starting reads a data file from the external server (say www.google.com/data.js). It checks with my SQL lite database and if the versions doesn;t match, then it updates the SQLITE. The problem now is, in the emulator, the data.js file gets cached up. Only when i uninstall the application it actually loads the new data. How do i avoid caching the JS file?

1 Answers1

0

add a random number as querystirng to the javascript call, so the andorid considers the files as new one each time it loads. Eg: myURL = 'www.mysite.com/data.js?' + Math.random(); $.getScript(myURL, function(){});

This way my jquery will load the file each time the application starts.