I am developing a web application that uses Comet Hidden iFrame technique to push data from server to mobile browser.
Everything works fine on Mobile Safari but Android is a lot more painful. It seems to require 4 KB messages to be sent from the server in order the message to be taken in account. This is for each messages not only the first one.
Some people tried implementing Comet using XMLHttpRequest streaming but have the same 4KB issues (http://code.google.com/p/android/issues/detail?id=13044)
Has anyone managed to implement Comet techniques on Android browser without requiring to pad the messages to 4KB ?
Tested on Android 2.1,2.2
Server sent event seems not to be supported even on version Android 4.0 http://caniuse.com/eventsource
Same for websocket http://caniuse.com/websockets
thanks
-seb
Not sure if it qualifies as an answer to your immediate problem, but the general recommendation is to use a future-proof technique that falls back to a reasonably good polyfill.
For your specific issue, I believe WebSockets is the best technology, in combination with a WebSocket server (node.js, Kaazing), with good fallback options. I'm more familiar with Kaazing: it provides virtually the same performance on non-WebSocket-compliant browsers as the native WebSocket performance. For more on WebSocket emulation, you may find this post useful on WebSocket emulation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With