Last Updated: November 09, 2017
· szymonkor
Zrzut ekranu z 2016 04 16 07 43 55

HTTP cache headers explained

  • proper configuration of http cache headers is one of the key variables affecting loading speed
  • cache header can prevent browser from asking for same asset over and over again
  • CDNs (content delivery networks) are servers between end user and your server designed to cache some content. "When configured properly, CDNs will deliver content to your end user from the fastest, (and typically closest) server available"
  • " if you just setup your cache and fail to configure your caching headers correctly, it's quite possible to end up paying twice for every request."

Basic headers:

  • cache-control
  • expires
  • etag
  • vary
  • pragma

Dynamic content?

"Generally the rule of thumb for dynamic content, like the HTML files of a WordPress blog, is to set “cache-control: no-cache” and prevent the CDNs or User Agents from storing the asset. For most applications, serving your own dynamic content is probably fine"

SOURCE: http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/ and this source is extensive and awesome. I think a front-end developer does not have to remember all the stuff and fancy params, but it is very important to understand what the browsers tell us.

Say Thanks