Chapter 8. ETags

 

This chapter covers

  • ETags: what they are and why you should change them
  • How browsers validate cache components
  • Removing ETags in ASP.NET Web Forms and ASP.NET applications

In chapter 4, we examined and implemented HTTP Expires headers in an ASP.NET application. These HTTP headers tell the browser it can store certain components in its cache for a set amount of time, thereby reducing page load times because the browser doesn’t need to retrieve these components from the server. In order to ensure the components are still valid, the browser makes a small validation request. In this chapter, you’re going to investigate the ways the browser validates its cache components and what you can do to eliminate unnecessary HTTP requests.

ETags, also known as Entity Tags, are a protocol used for HTTP caching. They’re unique strings that are sent back in the HTTP response that help the browser identify and validate the browser cache. If used incorrectly they can be inefficient, so in this chapter you’re going to learn how to tweak your application so it performs at its best.

8.1. What are ETags?

8.2. Why should I change ETags?

8.3. Removing ETags in ASP.NET Web Forms and ASP.NET MVC applications

8.4. The results

8.5. Summary

sitemap