iOS6 breaks long polling
realsoftwareblog.com
realsoftwareblog.com
I did however see that safari was not leaving the loading state (and thus not firing any of the loaded events, nor hiding the URL bar) if I started the long polling connection before the page was fully loaded.
Once I moved opening the connection to a setTimeout callback inside the onLoad handler (so not DOM ready, but actual load), this went away and the page works normally.
Still a pretty bad bug, though.
Additionally, the first iOS 6 betas had the browser in such a bad shape that it was obvious they were still working on it. I took one look at it and figured "i'll test it when they're done". They need to have some sort of clear indication of when it's actually ready for testing (and not just for testing of the native SDK's).
Maybe I am living in a bubble but every single web developer I have ever met used a Mac. Why ? Because it is the only platform that has Photoshop + a UNIX shell.
Also, cygwin.
And Cygwin is a joke. Dealing with the page separator differences alone would make it unbearable.
There's more Macs at the Edinburgh Ruby user group meeting than at the Mac user group meeting!
However, for your ability to test in the future: the only thing I believe the iOS beta requires related to owning a Mac is that the downloads from Apple's website for the IPSW files are stored inside of disk image files; you only need access to a Mac long enough to restore your device, but I am not certain why you would need a Mac to work with it later. (I would love to be told I was wrong there, however, so I could add that to the list of endemic issues leading to this.)
I mean, even though Chrome allows 6+ concurrent connections to a single hostname, nothing's stopping users from opening 10 tabs of your application.
I've no idea why Quora does that, but I'm pretty sure it's not a standard thing. You really should only being doing one long poll at a time, so it should never be an issue.
However, when you upload a picture, apparently, they are all called image.jpg. Since the image name never changed, every time I uploaded a new pic, the first pic was being returned. I couldn't understand why, and as usual, stackoverflow had a good answer for me. I needed to add a timestamp option to my URL in order to work around this behavior.
If the browser only opens one connection to a domain at once, it should have made so many sites much slower to load and it's hard to believe Apple don't have automated tests to check for performance regressions like that.
Well, I mean, this is the same company that has received "some press" recently regarding the latest version of its mapping application.
Edit: That was a low blow, wasn't it?
Workaround is easy: make sure your long-polling connection is not keep-alive connection.
Name: max_connections_to_host
Type: Integer [1..8]
Value: 8
Description:
Maximum number of concurrent connections to a given host.While your desktop can handle 8 connections the 3G connection can't.
But isn't chrome for iOS just a "skin" with new features on top of the same safari browser?
One issue like I would expect to affect Chrome as well.
It's fully open source and can be self hosted as well:
Since everything will be moving to websocket eventually, might as well get a head start on iOS.