When it comes to web applications, there's no such thing as "too fast". We explain how caching works and how it can improve the performance of your web app.

Use Caching to Improve the Performance of your Web App

When it comes to web applications, there's no such thing as "too fast". If a website takes more than 3 seconds to load, over 50% of visitors will abandon it

There are many ways to improve a web app's performance. One of the best ones is caching.


How Web Apps Work

Web Applications are backed by a Database. They have a simple -yet "slow"- process to create information:

  • Taking a request from the user
  • Processing the request
  • Fetching information from the database
  • Processing the information
  • Rendering the output into HTML
  • Sending the output back to the user

This process can be very time-consuming, especially if there is no need to go through it. 


How Caching Works

Caching means saving the HTML output of the last request. Whenever a user has the same request, that's the output that will be sent back. There's no need of going through the whole process - and having to fetch the information from the database.

Of course, there’s more to it, but that’s enough to understand why caching is so important.


An Analogy to Understand Caching

I once heard a great analogy that explains caching perfectly. Imagine a taxi driver that moved to a new city and doesn't know the streets. At first, whenever he takes a customer to a certain place, he'll ask the best routes and check the GPS. 

After some time, he'll remember the routes. And when he gets a request that he had received before, he won't have to repeat the process. No need to ask directions or look at the GPS. He'll know his way.

It may not be that client's preferred route, or there may be some changes in traffic that he didn't know about. But the trip will be faster because he didn't need to fetch information from his database.



Caching is a great way to improve the performance of web apps. 

The process won't be personalized for every user, but the output will be sent much faster.

Why You Should Redesign Your Business Website

First impressions are essential, and your website will be the first impression clients have of your business. Here's why you need a new website.

Read more
Cookies disclaimer

I agree Our site saves small pieces of text information (cookies) on your device in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By browsing our website without changing the browser settings you grant us permission to store that information on your device.