Performance Auditor — validates cache headers for optimal web performance.
Performance
Cache and delivery efficiency for HTML, assets, and APIs.
Resilience
Safer cache directives that avoid stale or user-specific content.
How it works
The Cache Checker scans web pages and validates cache headers for different types of resources (HTML, versioned static assets, unversioned static assets, APIs) according to industry best practices. It can also use platform-specific checkers when certain software stacks are detected.- Software stack detection — analyzes the request stack to determine if platform-specific logic should be used
- Page loading — uses Playwright to load the provided URL in a headless browser
- Resource discovery — scans the DOM for resource URLs (
img,script,link,video,iframe) - Resource classification — categorizes resources as HTML, versioned static, unversioned static, or API
- Cache analysis — for each resource, performs an HTTP HEAD request and analyzes cache headers
- Issue detection — applies validation rules based on resource type and aggregates findings
/documents/).
What it checks
The Cache Checker analyzes HTTP cache headers across different types of web resources to ensure optimal caching strategies:- HTML Pages: Validates that HTML responses have appropriate cache directives (
max-age=0,must-revalidate, orno-cache) with proper validators (ETag/Last-Modified) - Versioned Static Assets: Ensures versioned resources (JS, CSS, images with version parameters) have long-term caching (
max-age≥ 1 year) withimmutabledirective - Unversioned Static Assets: Checks that unversioned resources use short cache times (≤ 1 hour) or revalidation mechanisms
- API Responses: Validates API endpoints have appropriate cache strategies with proper validators
- Platform-Specific Logic: Automatically routes to Liferay-specific cache validation when Liferay is detected in the software stack
Cache-Control, ETag, Last-Modified, Set-Cookie, Vary, and Expires headers to identify caching issues.
Output documentation
Risks and considerations
Performance degradation
- Poor cache configuration leads to unnecessary server requests and bandwidth usage
- Users experience slower page load times due to repeated downloads of unchanged resources
- Increased server load and hosting costs from redundant resource serving
SEO and user experience impact
- Slow loading pages negatively affect search engine rankings
- Poor user experience leads to higher bounce rates and reduced conversions
- Mobile users on slow connections are particularly affected
Security and privacy concerns
Set-Cookieheaders on cacheable resources can expose sensitive user data- Improper
Varyheaders may cache user-specific content inappropriately - Long-lived HTML caching without revalidation can serve stale or sensitive content
Operational issues
- Difficult to deploy updates when resources are cached too aggressively
- Inconsistent cache behavior across different browsers and CDNs
- Debugging becomes complex when cache issues mask other problems