Skip to content(if available)orjump to list(if available)

HTTP Caching, a Refresher

HTTP Caching, a Refresher

4 comments

·December 23, 2025

baggy_trough

A lot of this seems irrelevant these days with https everywhere.

jarofgreen

Some of it is different, but the basics are still the same and still relevant. Just today I've been working with some of this.

I took a Django app that's behind an Apache server and added cache-control and vary headers using Django view decorators, and added Header directives to some static files that Apache was serving. This had 2 effects:

* Meant I could add mod_cache to the Apache server and have common pages cached and served directly from Apache instead of going back to Django. Load testing with vegeta ( https://github.com/tsenart/vegeta ) shows the server can now handle multiples more simultaneous traffic than it could before.

* Meant users browsers now cache all the CSS/JS. As users move between HTML pages, there is now often only 1 request the browser makes. Good for snappier page loads with less server load.

But yeah, updating especially the sections on public vs private caches with regards to HTTPS would be good.

nerdbaggy

These are still used in CDN and internal browser caching

esseph

Just the opposite, caching is everywhere now. How do you think a CDN works?