Keep-alive and Safari

As I understand from reading the mail list, keep-alive is not enabled
for Safari browsers.
We really would like to enable this (for at least iPhone/iPad
clients)…

Questions:

  • Is keep-alive disabled for all Safari/Web kit browsers?
  • Can this be configured, to allow keep-alive even for Safari?

Whe are using nginx 0.8.53

/Jan Andersson

Hello!

On Thu, Nov 25, 2010 at 07:04:45AM -0500, doors wrote:

I also founded NGIX disabled keep-alive for safari.

I am not sure exact reason of this.

http://nginx.org/pipermail/nginx/2010-October/023131.html

Maxim D.

I also founded NGIX disabled keep-alive for safari.

I am not sure exact reason of this.

ngx_http_core_module.c

if (r->keepalive) {

        if (r->headers_in.msie6) {
            if (r->method == NGX_HTTP_POST) {
                /*
                 * MSIE may wait for some time if an response for
                 * a POST request was sent over a keepalive

connection
*/
r->keepalive = 0;
}

        } else if (r->headers_in.safari) {
            /*
             * Safari may send a POST request to a closed keepalive
             * connection and stalls for some time
             */
            r->keepalive = 0;
        }
    }

Posted at Nginx Forum:

Hi,
regading:

I also founded NGIX disabled keep-alive for safari.

I am not sure exact reason of this.

Safari intermittently hangs when loading FCGI request

I still beleive it would be great if there was an option to enable
keep-alive for Safari.
Not all sites need this work-a-round…

/Jan

On Thu, Nov 25, 2010 at 07:09:31PM +0300, Igor S. wrote:

I still beleive it would be great if there was an option to enable keep-alive
for Safari.
Not all sites need this work-a-round…

The attached patch introduces
safari_keepalive on|off;
directive. The default value is “off”.
It will be included in next 0.9.0.

It can be set on http, server, or location level.


Igor S.
http://sysoev.ru/en/

On Thu, Nov 25, 2010 at 04:49:52PM +0100, Jan Andersson wrote:

Not all sites need this work-a-round…
The attached patch introduces
safari_keepalive on|off;
directive. The default value is “off”.
It will be included in next 0.9.0.

Hello!

On Thu, Nov 25, 2010 at 07:09:31PM +0300, Igor S. wrote:

I still beleive it would be great if there was an option to enable keep-alive
for Safari.

Not all sites need this work-a-round…

The attached patch introduces
safari_keepalive on|off;
directive. The default value is “off”.
It will be included in next 0.9.0.

I would like to see something more general, e.g.

keepalive_disable safari msie6;
keepalive_disable off;

This should be helpfull for servers without POST’s at all, and
looks much more extendable.

Should I prepare a patch?

Maxim D.

On Thu, Nov 25, 2010 at 07:32:05PM +0300, Maxim D. wrote:

It will be included in next 0.9.0.

I would like to see something more general, e.g.

keepalive_disable safari msie6;
keepalive_disable off;

This should be helpfull for servers without POST’s at all, and
looks much more extendable.

You are right. The attached patch introduces
keepalive_disable safari msie6; # default
keepalive_disable none; # turn off

It’s great.

thanks for prompt response.

/YM

Posted at Nginx Forum:

On Thu, Nov 25, 2010 at 08:23:04PM -0500, doors wrote:

Is patch for 0.8.53 ?

Yes.


Igor S.
http://sysoev.ru/en/

Is patch for 0.8.53 ?

Posted at Nginx Forum:

Hi

Is it also suitable for 0.7.x and 0.6.x ?

-----ʼԭ-----
: Igor S. [mailto:[email protected]]
ʱ: 20101126 13:53
ռ: [email protected]
: Re: Keep-alive and Safari

On Thu, Nov 25, 2010 at 08:23:04PM -0500, doors wrote:

Is patch for 0.8.53 ?

Yes.


Igor S.
http://sysoev.ru/en/


nginx mailing list
[email protected]
http://nginx.org/mailman/listinfo/nginx

This e-mail is confidential. It may also be legally privileged.If you
are not the addressee you may not copy, forward, disclose or use any
part of it. If you have received this message in error,please delete it
and all copies from your system and notify the sender immediately by
return e-mail.Internet communications cannot be guaranteed to be
timely,secure, error or virus-free. The sender does not accept liability
for any errors or omissions.

On Fri, Nov 26, 2010 at 01:54:16PM +0800, Zhang,Tony wrote:

Hi

Is it also suitable for 0.7.x and 0.6.x ?

It’s not suitable for 0.7.x.
0.6.x does not disable keepalive for Safari.

On Thu, Nov 25, 2010 at 08:23:04PM -0500, doors wrote:

Is patch for 0.8.53 ?

Yes.


Igor S.
http://sysoev.ru/en/