-
26 Jul 2012 6:52 AM #1
Unanswered: Microloader, localStorage, cache.manifest
Unanswered: Microloader, localStorage, cache.manifest
Hi,
I have following code in app.json:
and in cache.manifest:Code:"js": [ { "path": "app.js", "bundle": true, "update": "delta" } ],
which changes if I update the file.Code:# d5db6d2b81a9dda1c37d6f6ce071f8892396f0fe app.js
After the file has been stored in localStorage it doesn't update although a hash with new delta in cache.manifest changes. In the result a new version of my app doesn't show up in the browser (Chrome).
The app was build with sencha tools with command: sencha app build production
Do I miss something?
Thanks in advance for help.
-
28 Jul 2012 6:06 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
You shouldn't put app.js in the cache.manifest, app.js will be stored in localStorage
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.
-
30 Jul 2012 12:13 AM #3
Ok, I've removed it from cache.manifest, but it goes to localStorage and has not been updated thou.
HTML5 documentation says at when cache.manifest changes, files are going to be refreshed. Does it not work similar in Sencha with localStorage caching?
Here http://www.sencha.com/learn/taking-s...-apps-offline/ James Pearce shows an example of cache manifest:
and he puts <html manifest="app.manifest"> at the top of index.html. Should I add it manually after Sencha SDK Tool does its jobb or should I leave it as it is.CACHE MANIFEST
index.html
app/app.js
lib/touch/sencha-touch.js
lib/touch/resources/css/sencha-touch.css
Thanks for help!
-
30 Jul 2012 6:11 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
The localstorage mechanism makes an Ajax request to app.json and if successful it sees if there are any delta updates. If so then it attempts to load them. Once they are loaded it will prompt the user to refresh the page as there was an update applied.
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.
-
30 Jul 2012 6:25 AM #5
Ok, so I see at there is an issue with external resources. I've read at it is impossible in Sencha to request external url in the way: http://url.toexternalscript.com/scripts/s.js or /scripts/s.js if it is on the same server.
When I am building an app I am getting an error at:
orCode:ENOENT, no such file or directory 'C:\[path]\m\scripts\s.js'
When I edit already minified app.json.Code:Uncaught ReferenceError: Ext is not defined
I hope you can help me with that. I've searched forum and google it but I've never found good unswer to solve the problem. Then everyone could find the way how to fix that problem.
Greetings


Reply With Quote