HTML 5 offline cache in Android Chrome - android

I have a web application that works perfectly well on Desktop Chrome browser, on IPhone and IPad browsers and android build in browser.
However when I tried to run it on the new Chrome for Android it does not works. I found out that the manifest file is not even queried (downloaded). The request for the file is never fired. At least it never arrives to the web server.
Does anybody know, is this feature (offline cache) supported for Chrome on Android? Or is there some other possibility why it would not work?
EDIT: First three lines from main index HTML which is the only HTML in the app.
<!DOCTYPE HTML>
<html manifest="resources/advanced/common/cache/application.appcache">
<head>
EDIT2:
The weirdest thing, it just started working. Today I sat down and tried to further test the issue. Out of the blue with no changes at all my web server started receiving requests for the manifest file. And all of a sudden the app just works. Now talk about strange.

According to here Chrome for Android does support the App Cache: http://html5test.com/compare/browser/chromemobile.html
Are you sure the HTML syntax is correct and that you have the right MIME type set up for the manifest file on your server? Reporting any errors that occur might help indicate the problem.

Related

Cordova Url Loading Not Working

I am coding a Cordova application in Visual Studio. It is a hosted web app which means Cordova starts a webview with the local index.html and after deviceready, I redirect the document location to my locally hosted web url.
When I was testing on iPhone (iOS 9.3), I noticed that the Cordova app hangs/freezes at the splash screen after I rebuild the hosted web page. I thought it might be due to the latency occurring after compilation because it works in the successive trials. And I tried to debug using Visual Studio, attaching to the local device, and using the console I changed the url to test several sites. When response is immediate, no problem but when there is even about a second of latency, it does not navigate, but there seems no error in the Javascript Console of the Visual Studio debugger.
I know that there is a "loadUrlTimeout" parameter in the config.xml for Android but there is none for iOS. (I did not try it with Android if there is such a problem there too.) Am I doing something wrong? Is this the expected behavior? How can I fix it?

Android app works fine on web and on device through PhoneGap Desktop, but is just white screen on build.phonegap.com

This is my first time using build.phonegap.com. I have built an app that is entirely self-contained and doesn't use any connection or camera etc. It uses jquery, jquery mobile, HTML and CSS. It is a simple quiz that simply navigates through the DOM to verify the user input.
Here's what I do:
I use PhoneGap Desktop (on Windows) to generate the project and then add the code afterwards. I test it on my browser, then I test it on my device (Android) through Phonegap Desktop and then I zip up the folder (the project folder that was originally generated by phonegap desktop) and upload it to build.phonegap.com.
When I run it through the browser it works perfectly, with no error in the console.
When I run it though my device via PhoneGap Desktop, again, it runs perfectly.
When I upload it to build.phonegap.com, all seems to be fine (no issues in the debugger either). I run it my Android device via the QR-code-download and it installs with no issues.
When I open the app via build.phonegap.com, I just get a blank white screen.
I have checked my config.xml file and all the images and references are correct. All js and css files are referenced correctly (I've checked and it all works on my device via PhoneGap desktop and on my browser).
There are no js errors in the Chrome console.
I have feeling that I'm missing out something important. I haven't developed an app for a while a lot of the advice and tutorials seem to be out-of-phase with my project.
Can anyone help?
Many thanks,
Joe

Cordova/Phonegap and HTML5 App cache on Android

I'm trying to make an app which is available to users while offline, but updates if it's online . So i was thinking about using the HTML5 cache just for that, caching up the most recent version. The problem is , sometimes it works sometimes it doesnt. I have an index.html page in my Cordova App which sets your window.location to the http online link. Why wouldn't it work all the time? I have my manifest.appcache configured and mime-types enabled, sometimes it will just show a blank page not found ,even though it downloaded a page which included a manifest. Is there anything i'm missing? I put the link setting in index.html after the javascript body load event. It's android that i'm testing , so far i tried with an Iphone 1 time and it worked.
If you guys know more, please share

CSS loading issue with Android ICS

I have an Android ICS 4.0.3 installed in my phone. I have created one Mobile Web Application (test url http://drupal.langoor.mobi), for which I serve the HTML page from the MySQL database in the backend dynamically.
Problem:
The html page is not rendered by the default stock browser of Android and Dolphin browser.
This problem does NOT occure in chrome, firefox, safari mobile browsers.
To figure out the problem, I followed these approaches:
Used Adobe Shadow to do remote inspect of the HTML Page, which did NOT help much becuase I was NOT able to see any error in content loading.
Assuming Javascript/jQuery conflicts to be a problem, I tried removing all the linked js files which are served dynamically from server (not Static), then the HTML page was rendering but with no style applied.
I tried searching and found this link but it's not helpful:
Android - html from android_assets in WebView, CSS not loading in ICS
Please help me out with this.
After digging more around Problem, I found that main cause for problem was, content being sent in Uncompressed format from Server and because of which Android ICS's default and Dolphin Browser are not able to render it properly.
Here is the link where i have mentioned exact cause of problem.
Enabling data compression for Apache2 + FastCGI setup
Thanks

Jquery Mobile App not displaying certain images on Android

I have a full Jquery Mobile app the currently builds and looks fine in multiple browsers. I am currently working on getting the version ported using phonegap for android. As it loads up on the phone, it has several images that are loaded depending on localStorage (I originally used cookies but found some android devices aren't too friendly with that). Now, almost all of these triggers load images fine, except the last page. A certain set of images won't load, and I get the error (when running in an emulator Unknown chromium error: -6. Others on the page use the same process and have no problem, and all the images are referred to locally.
Why would this be happening and what can I do to fix this?
Turns out in the android browser, under phonegap, file names are case-sensitive. So it wasn't able to load things with capital letters and such.

Categories

Resources