Safari Sends Two HTTP Req. Same Time/Socket

前端 未结 3 840
不思量自难忘°
不思量自难忘° 2021-01-23 15:31

I have an IPad Safari sending two HTTP requests (two different PNG) files within 30 ms.

I thought that even on a Keep Alive HTTP 1.1 connection there should be a clear

相关标签:
3条回答
  • 2021-01-23 16:06

    I think that this may be due to browser adhering to HTTP 1.1 Spec 8.2.4. which does allow client to retry the request if client is connected to server thru a middle layer and doesn't get a response from server before the connection is closed.

    I have seen this error and have found following links to be helpful.

    https://www.ravellosystems.com/blog/beware-http-requests-automatic-retries/

    http://geek.starbean.net/?p=393

    0 讨论(0)
  • 2021-01-23 16:11

    It looks like HTTP pipelining:

    HTTP pipelining is a technique in which multiple HTTP requests are sent on a single TCP connection without waiting for the corresponding responses.

    0 讨论(0)
  • 2021-01-23 16:16

    I am seeing this too from a mobile safari client. The only workaround I was able to find is to disable keepalive for the whole server in Nginx. We don't get duplicate requests and/or pipelining might not work from the Safari client when keepalive is disabled.

    In Nginx, there is a keepalive_disable option, but it only works for POST requests on certain browsers, and doesn't have many options. We ended up disabling keepalive on that server using keepalive_timeout 0; I hope there is a better solution in the future.

    I would think that a correct use of pipelining would submit multiple differing requests, instead of duplicate requests.

    0 讨论(0)
提交回复
热议问题