About HTTP Cache, something you should know as a web developer

Kai Gao
Ok Coder
Published in
3 min readAug 2, 2021

--

Recently, I met a problem that force me to deal with HTTP caching, because one of my sites doesn’t update when the headless CMS updated content. It turns out that the service provides automatically enabled a CDN (content delivery network) for my site, which cache the content requested in there.

So what is HTTP caching for the web?

Caching the process that store resource in somewhere to help fasten the loading speed and enhance performance. There are currently two kinds of caching. One is the browser caching, and the other is proxy caching.

Browser caching is easy to understand, imagine you have a supermarket, the supplier sometimes may put some goods in your warehouse for your convenience, before you order some products from the supplier, you will check if you have them in stock or not, if they are expired or not, then you will make your decision.

For proxy caching, like we mentioned the example of CDN, your supermarket may have limited place for products, or there are some similar businesses around you, so the supplier decide to build a distribution center close to you, as long as someone in your area ordered something, they you bring more to the center, next time when others need it, it will go from the distribution center.

--

--