Specify a Cache Validator

What is a Cache Validator?

The “specify a cache validator” message is another web page optimization suggestion you may come across during a website check. A cache validator is used in the response header to validate that caching is present within a page and to set and confirm the cache length. For example, when you visit a web page, the cache validator will help determine if the page request requires a fresh download or, if this is a page you have visited before, if files can be retrieved from cache. Obviously, if the request must go through the origin server, then the request is going to take longer. However, if the cache is still valid, then you can take advantage of the benefits of cached resources and better performance. You can check this for yourself by visiting a page.

How to Specify the Cache Validator

Setting the cache validator can only be done for the resources your web server. This includes setting the headers that validate the cache, the Last-Modified and ETag (Entity Tags) headers, along with the headers that are responsible for setting the cache length, the Expires and Cache-Control headers. Without configuring these headers, the client/browser will not know how long to keep a copy of the cache, resulting in the browser unnecessarily requesting resources from the origin server, which is inefficient and causes the browser to take longer to reload all the resources. In terms of user experience, this is not ideal and what you want your users to have to wait through. One important note is that any third-party resources that this message comes up for must be taken care of through that third-party or can be ignored, as cache controls cannot be set for those assets and resources that you do not have control over.



Lighthouse is an open-source tool that is used to run an audit against your web pages and provides scores and suggestions for improving page performance, accessibility, SEO, and more.


PageSpeed Terms

PageSpeed Insights is a tool created by Google that reports on the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved.



YSlow is an open-source website analysis tool that can be used to identify web page performance issues. Learn more about the YSlow to enhance your web pages and the user experience.