WebPagetest Forums
Keep alive enabled but no for webpagetest - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Keep alive enabled but no for webpagetest (/showthread.php?tid=12624)



Keep alive enabled but no for webpagetest - Sepu - 10-22-2013 11:21 PM

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:
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>

thank you.


RE: Keep alive enabled but no for webpagetest - robzilla - 10-23-2013 06:41 AM

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.


RE: Keep alive enabled but no for webpagetest - Sepu - 10-23-2013 05:20 PM

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."


RE: Keep alive enabled but no for webpagetest - robzilla - 10-23-2013 11:11 PM

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.

His suspicion is probably valid in your case.


RE: Keep alive enabled but no for webpagetest - Sepu - 10-24-2013 12:18 AM

Thank you robzilla, I'll show it to my hosting admin.

Ok now is enabled!!!!!
http://www.webpagetest.org/result/131023_7P_KYR/1/performance_optimization/

thank you rob! Big Grin Big Grin Big Grin


RE: Keep alive enabled but no for webpagetest - robzilla - 10-24-2013 01:53 AM

Great :-)