12 Feb 2013 4:02 AM #1
Unanswered: Touch 2.1.1 web app not caching anything
Is it possible to build for production a ST 2.1.1 web app to run without caching anything ?
I mean that i want always that the web app refeshes from server (index.html, *.js, etc...)
12 Feb 2013 8:00 AM #2
Remove the manifest entry in the index.html
A brute force attempt is to call localStorage.clear() in your application's launch method. Of course, that will also blow away anything else you're storing in there. But it will force the browser to reload the assets listed in app.json.
12 Feb 2013 9:19 AM #3
i put this in index.html
<!DOCTYPE HTML> <!--<html manifest="" lang="en-US">--> <head>
Tested in iphone IOS 6 after clear safari cache
Testes in Android 4 after clear browser cache
Continues catching something, because if i upload a new version of webapp builded, in android i continue seeing the older version. Refresh browser page and the same older page. It runs only clearing the cache.
is this normal ?-------------------
12 Feb 2013 9:47 AM #4
That's just the browser caching those assets in its internal cache.
If you *really* want to reload them every time, use query parameters after each asset name, where the query parameter changes each time the page is loaded. To do this would require some server-side processing of the app.json.
However, at this point, you'd be using only one feature of the ST2 build process: the code concatentation / minification. If that's all you want, then simply take the app.js that you get as the output of the production build process, and insert that directly into a script tag in your index.html. Then, on the server side, have a bit of php that appends a timestamp as a query parameter to the end of the src URL for that app.js
13 Feb 2013 12:45 AM #5
cyee, thanks for your response.
The main problem is that when i build my app using Sencha Touch 2.1.1 and Sencha command v126.96.36.199 (in windows 7 32 bits), each time that i upload a new version of my production app to the server, when testing in iphone IOS 6, automatically the app asks for refesh the upgraded version, but if i try in android 2.3 or android 4, never was asked and always shows the old version of the app.
I think this was a bug like this post , and then i think that trying to disconnect caching anything it will solve the problem in all platforms, meanwhile this problem was solved by sencha).
Also i have tried the patch from Jacky in this thread (http://www.sencha.com/forum/showthre...oduction-build) but this patch repairs the problem in android, but produces the failure in IOS.
In general, i'm confused about this annoying situation.
23 Feb 2013 6:07 AM #6
updating from sencha touch 2.1.0 to 2.1.1
i have the same problem, after updating to 2.1.1 my apk file do not show the new application on android device, it shows only the old version. and we get no answer here..