Web page timeouts on iPhone in the UK with O2

I have recently started seeing weird web browsing behavior on my iPhone while on 3G, Edge, or GPRS (not WiFi) with empty responses being returned from various web sites.

I initially thought that this was a problem limited to my iPhone application and/or to Safari Books Online but after looking into it further (and based on feedback from other O2 iPhone users in the UK experiencing the same issues), I've come to the conclusion that it is a greater issue that is probably affecting all O2 iPhone users to some degree.

The easiest way to know whether you're affected is if you get a completely blank page in Mobile Safari when surfing the web on your iPhone. Refreshing (possibly multiple times) may make the problem go away.

The issue: timeouts

The actual error being returned from NSURLConnection is the following:

ERROR: Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x149aa0 "timed out"

A quick Google search on the error brought up a couple of discussions: one on the Apple discussion forums that concludes that it's a DNS issue when going from WiFi to cellular. I'm assuming that that discussion took place between users in the US (given the use of the term "cellular") so it may even be a wider issue affecting the iPhone in general.

Workarounds

I don't know what the timeout in Mobile Safari is or how it can be changed so I'm not sure about a workaround for general browsing but, for your own apps, you can simply raise the timeoutInterval when creating your NSURLRequest.

Comments