17 Jul 2012 12:02 PM #1
EXT.Ajax.request on Large Files is Broken Android 2.2
I know it is a very small user case but I can confirm an issue much like what is posted here
Essentially using Ext.ajax to load a large file will return a Status of 0 on Android 2.2. It works fine on Android 2.3 and above though. I know this is a Ext issue as if I switch over to jQuery $.ajax and load the exact same file it works without a problem.
It would be nice to not include jQuery into my application but for now that's the only way it will work loading large local files with ajax.
18 Jul 2012 5:23 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
How large of a file are we talking about?
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
18 Jul 2012 8:25 AM #3
I was loading a 2.6mb file but I am going to go out on a limb and say it will happen with anything over 1MB, this is only a guess though. I started down this road because of this issue.
I hope this post will help some people but if you are trying to build for android 2.2 using Sencha you will have a problem because your app.js will likely be larger then 1MB. Android 2.2 will attempt to compress this and break. You will receive an Error reading "Data exceeds UNCOMPRESS_DATA_MAX"
My work around was to rename app.js to app.jet and fix the reference in my index.html file also JUST for android builds. This is stupid, but it works. Only files listed on that website for NO compression will work over 1MB.
Again this is ONLY Android 2.2, as 2.3 has fixed this problem. You will need to do this for any files in your www folder that are larger then 1MB and do NOT have a extension listed on that page.