2

I'm just wondering how many simultaneous connections per domain does iOS Safari on iOS allow?

I've got a web page that uses long polling (up to about 40 seconds) and I am under the impression that all HTTP requests get queued until the server responds to the polling request (testing on iOS6 on iPad 2). Is that a real possibility?

Gyum Fox
  • 3,287
  • 2
  • 41
  • 71

2 Answers2

4

Hmm I found this other question on Stackoverflow: Failed to create 5th http connection in iOS4

There is a test page to run in the answer to that question: http://www.spasche.net/files/parallel_connections/.

The first time I run the test on an empty cache on my iPad 2 on Safari (iOS 6.1.3), I got a surprising:

"Your browser seems to use 0 simultaneous connections to this server."

On the second time and thereafter I got the following:

"Your browser seems to use 5 simultaneous connections to this server."

Community
  • 1
  • 1
Gyum Fox
  • 3,287
  • 2
  • 41
  • 71
1

Without your own queue code it is possible to handle only 5 simultaneous connections at one time. You can of course use NSOperationQueue for example, to handle more.

Please check out this resources for more info:

http://blog.lightstreamer.com/2013/01/on-ios-url-connection-parallelism-and.html

Maximize the number of simultaneous http-downloads

Community
  • 1
  • 1
Artur Ozierański
  • 1,177
  • 7
  • 18
  • Hey Artur! I amended the question, which in fact targets Safari on iOS, not iOS in general (I should have been more precise). Does the same limit apply? – Gyum Fox May 22 '13 at 07:52
  • 1
    Ah, ok. But I guess in Mobile Safari there will be the same limit cause this is the same API used in Safari. But I'm not sure. – Artur Ozierański May 22 '13 at 09:52