-
3 Sep 2012 6:37 AM #1
Unanswered: Cannot disable the disableCache mechanism - app does not run offline
Unanswered: Cannot disable the disableCache mechanism - app does not run offline
The first lines of my app.js read:
The app compiles to the production version without errors or warnings. It loads and runs from the server. When I try to run it offline in Chrome, those errors occurCode:Ext.Loader.setConfig( {enabled: true, disableCaching: false} ); Ext.data.Connection.disableCaching = false; Ext.data.JsonP.disableCaching = false; Ext.data.proxy.Server.prototype.noCache = false; Ext.Ajax.disableCaching = false;
which indicate that the timestamp of the disableCache parameter is appended to the GET requests. Therefore the application does not load offline. It hangs at the "Application is being loaded..." screen. How can I enable caching and avoid this _dc parameter?
The SDK version is 2.0.1.1
-
3 Sep 2012 1:21 PM #2
Probabl everything related to disable cache should be true not false.
-
3 Sep 2012 1:25 PM #3
-
5 Sep 2012 4:55 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
It looks like the classes that you have an error on did not get built into the build. Did you require it?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
6 Sep 2012 1:11 AM #5
No, the missing class was not required explicitly.
Though it is listed in app.json under the keys /js/path and under /appCache/cache.
Now I explicitly included it in Ext.application({requires:"..."}) where it is the only entry. The other classes are loaded implicitly.
The error remains the same.
--- update
Meanwhile I included the whole code of Override.slider.Slider in app.js (urrghh) and purged any reference to the file. Now the app does work offline. But the console log in Chrome still shows this entry
GET http://blasentagebuch.de/m/app.json?1346932076018
I still do not understand why the timestamp parameter is appended to the file name, anyway, though I set disableCaching to false in app.js.Last edited by smantscheff; 6 Sep 2012 at 3:53 AM. Reason: Update on problem status


Reply With Quote