How Does Keepalive Help You Increase Speed

Network Neurons 2

Slow-roasted coffee is wonderful; a slow stroll through the park is relaxing; a slow competitor in a race is just great luck. But slow websites are a huge obstacle to your success. Seventy-five percent of web users will bounce out of a site if it takes longer than four seconds to load. Reducing your load time can help you keep users engaged and on your page.  One way to do that is to enable keepalive. How does it work?

When a webpage loads, the browser sends a request to the server to dish up the content. The server responds and sends the file. The browser has to ask for the HTML file, read it, and then request other files (webpages are typically made up of multiple files).  Now, imagine if this “conversation” had to take place for every single file. This would reduce the speed at which a page could load.

That is exactly what happens when keepalive is not enabled. It is like ordering a meal. Your server comes and you order a drink. Then he goes away, comes back, and you order your appetizer. Then he goes away, comes back, and gives you your nachos. Then he goes away and comes back and gives you the cheese that goes on your nachos…you get the idea. It would take forever to eat, and as a diner, you’d “bounce” away from that restaurant. This is what your website audience will do when your browser has to make multiple, separate requests of the server.

Keepalive keeps the connections open. Essentially, you are allowing the server to deliver content without having to make multiple requests.

The default for HTTP connects is keepalive enabled, but the server might close connections to allow for faster, more efficient performance. It is worth your time to check to see if your connection is keepalive enabled. If not, we’ll show you how to do it in part 2 of this post.

Leave a Comment