Contact Number

+9501010103

Email Address

contact@oxosolutions.com

Social Icons
Empowering small to large businesses since 2008

Fulfilling all your IT needs at single stop
CIN: U74999PB2016PTC045616​GSTIN: ​​03AACCO3599B1ZO

How to enable keep alive

How to enable keep alive

Enabling keep alive allows the visitor’s browser to download the content files including images, javascript files, css files etc through a persistent TCP connection. This means it will not make different requests for each file and thus reduces the request amount and speed up a web page. 

Whenever the browser requests a file from server, interaction takes place between the server and browser it creates a communication pattern which is keep alive. 

Benefits of using Keep Alive

  • Minimizes latency and overall increase in loading speed and performance.
  • Better site performance will be an advantage in terms of SEO and ranking.
  • Minimizes the usage of CPU and memory due to lesser number of generated HTTP request. This is an advantage to all hosting plan users (free hosting, shared hosting and VPS).
  • It provides HTTP pipelining which means same TCP connection is used to deliver requests
  • All modern browsers support Keep Alive
  • Additional benefits will be added to you if your website use HTTPS and SSL certificate.

How to enable Keep Alive?

Firstly, you need to determine whether Keep Alive is enabled or disabled on your server. Analyze your website using a tool such as GTmetrix.

In case of Apache 

You can choose one of the following ways:

  1. Open Apache configuration file on server and add. 

KeepAlive On

Your server needs to be restarted after adding this. 

  1. .htaccess file, add the below code

<ifModule mod_headers.c>

Header set Connection keep-alive

</ifModule>

In case of NGINX

If Keep Alive is disabled in your config file, you will find the following in the file. 

Keepalive_disable

You can use below code to make changes in the settings:

keepalive_requests

Keepalive_timeout

To sum up, improved site speed and performance will eventually keep your visitors happy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow Us