Chapter 4. Caching: The sell-by date

 

This chapter covers

  • HTTP caching and why you should use it
  • How to set HTTP caching in IIS
  • Caching considerations
  • File versioning
  • Output caching
  • HTTP caching results

It’s important to know where the bulk of your website visits come from. If you have a lot of repeat visits or if many people view more than one page before leaving your website, then HTTP caching can have a positive effect on your page load times. Modern browsers are really clever; they can interpret and understand a variety of HTTP requests and responses and are capable of storing and caching data until it’s needed. With the introduction of HTML5 and CSS3, modern browsers have become capable of achieving so much more than they could a few years ago. I like to think of the browser’s ability to cache information as the sell-by date on milk. In the same way that you might keep milk in your fridge until it reaches its expiration date before replacing it with a new carton of milk, browsers can cache information about a website for a set duration of time. After the data has expired, it will simply go and fetch the updated version upon your next visit to the website.

4.1. What is HTTP caching?

4.2. IIS and HTTP caching

4.3. Web.config settings

4.4. Caching considerations

4.5. Output caching

4.6. The results of HTTP caching

4.7. Summary

sitemap