Enable Connection Keep Alive to speed up your website
Page Visited: 446
What is Keep Alive?
HTTP connection Keep Alive is also known as HTTP persistent connection. An idea of using the single TCP connection to send and receive multiple HTTP requests and responses instead of opening a new connection for every request..
How Connection: Keep-Alive Works?
Connection: Keep-Alive works when browser loads the page and sends the request to the server. It processes the request and generates a response, it also adds a header to the response: Connection: Keep-Alive When this is done, the socket connection is not closed as before, but kept open after sending the response. When the client sends another request, it reuses the same connection. The connection will continue to be reused until either the client or the server decides that the conversation is over, and one of them drops the connection.
Why Keep Alive is Important?
Connection Keep Alive is important when speed is your concern. It reduces page load time by reusing the same connection for processing multiple requests. When keep alive is enabled, single connection is used to download the resources of a web page which significantly speed up page loading and it also decrease the server CPU usage.
How to enable or Connection Keep Alive?
It can be enable by setting HTTP header either in .htaccess file or setting your server configuration.
To enable connection keep alive setting using .htaccess file, you can add following code
<IfModule mod_headers.c> Header set Connection keep-alive </IfModule>
To enable connection keep alive using Apache server configuration, you can edit following settings in httpd.conf file
KeepAlive: Whether or not to allow persistent connection
Use “KeepAlive On” to enable it
Use “KeepAlive Off” to disable it
MaxKeepAliveRequests: Maximum the number of requests for every keep alive connection
Use “MaxKeepAliveRequest 20” or whatever limit you want to set
KeepAliveTimeout: Number of seconds to wait for the next request from the
Use “KeepAliveTimeout 100” or whatever time you want to set
#httpd.conf file KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 100
For further assitance you can comment here or you can contact thru My SEO Profile