Cache-Control Header
Checks the cache-control header to make sure it has appropriate values.
This test will check for the presence of a Cache-Control header which tells the web browser how it is allowed to store a response. When a user navigates through a website, resources that have already been downloaded will be quickly served from the local cache instead of being sent from the server again.
Typically, static resources like images and javascript files are cached for a long time. If the website needs to update one of these files, they will create a new one with a different URL that has no cache history associated with it. For dynamic resources, like a webpage that may be updated frequently, it is common to instruct caches not to store the response, or to at least revalidate it on every request.
Regardless of what caching strategy is desired by the website, a Cache-Control header should always be included. Without a cache-control header, the browser will default to using heuristics to cache the page which may not be the desired behavior. For more information about caching strategies, please read our HTTP Caching Tutorial.
Ready to validate your website for this test and 100+ others?