How to enable HTTP persistent or HTTP keep-alive connection feature for your WordPress website.

As Wikipedia explains:

HTTP persistent connection, also called HTTP keep-alive or HTTP connection reuse, involves using a single TCP connection to send and receive multiple HTTP requests/responses instead of opening a new connection for every request/response pair. The newer SPDY protocol uses the same idea and extends it to allow multiple concurrent requests/responses to be multiplexed over a single connection.

Note: I assume you have adequate knowledge of handling your server and server settings and are well-versed in your field.

You can put the following code in your .htaceess file, which is in the root of your server’s html folder.

<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>

After completing the above procedure, you are good to go,

But now you may be wondering whether the above settings are working or not, i.e. Keep Alive settings are on or not on your domain

Now go to & open the Terminal App available on OSX in Applications > Utilities folder

curl -Iv http://your-domain-name.com 2>&1 | grep -i 'connection #0'

Note: put your domain name in the URL of the above code

Then, after executing the above code in the Terminal, you get result something like this:

* Connection #0 to host your-domain-name.com left intact

Understand that Keep-Alive is working on your domain server.

Hope it helps,

Thanks & Regards
Mandar Apte

Published by Mandar Apte

Mandar is a Mumbai-based multi-disciplinary designer with UX/UI, Logo, Symbol, and Brand Identity design expertise. He currently runs his Mudrkashar Linguistic Apple iPhone, iPad, and Mac app business in the heart of Mumbai city.

Leave a comment

Leave a Reply