Keep alive enabled but no for webpagetest

Hi all,
this is my tesst result:
http://www.webpagetest.org/result/131022_MT_YHP/1/performance_optimization/#keep_alive_enabled

In my server the keep-alive is enabled, you can visit this page
http://flaccadori.it/keepalive.php
the code is
HTTP_CONNECTION = <?php echo $_SERVER['HTTP_CONNECTION'];?>

and in my htaccess I write that:

Header set Connection keep-alive

thank you.

The server that hosts your site is responding with “Connection: keep-alive, close”, i.e. it’s not allowing connections to be kept alive. You’ll find this to be true in most shared hosting environments.

Note that $_SERVER[‘HTTP_CONNECTION’] does not represent a server configuration. Instead, it’s based on the client’s request.

Thank you RobZilla, how I can see that response “Connection: keep-alive, close”?
I want to show it to my hosting admin, he said me “Apache Keep Alive setting is enabled on all our servers.”

You can use your browser’s developer tools to inspect the HTTP headers. In your WPT results, you can click through to “Details” page and then click on any of the resources to view the request and response headers. I’ve attached an example.

Patrick’s comments in this thread are relevant:

[quote]That means keep–alives are not really enabled. I’m partially convinced that hosting providers were doing that just so you thought it might be while still allowing them to disable it but when the browser sees that “close” it will close the connection.

The keep-alives are generally controlled at the server level and not controllable in .htaccess. You’ll need to reach out to your hosting provider.[/quote]

His suspicion is probably valid in your case.

Thank you robzilla, I’ll show it to my hosting admin.
[hr]
Ok now is enabled!!!
http://www.webpagetest.org/result/131023_7P_KYR/1/performance_optimization/

thank you rob! :smiley: :smiley: :smiley:

Great :slight_smile: