Skip to content

Caching Analysis

The Caching Analysis feature examines how effectively HTTP caching is implemented across your website. This analysis helps you optimize the caching strategy for different content types, improve load times, and reduce server load.

SiteOne Crawler provides comprehensive caching analysis from multiple perspectives:

  1. Caching by Content Type: Analyzes how different types of content (HTML, CSS, JS, images) are cached
  2. Caching by Domain: Compares caching implementations across different domains and subdomains
  3. Caching by Domain and Content Type: Cross-references domains with content types for a complete view

The crawler generates detailed tables showing cache implementations across your site:

Content type | Cache type | URLs | AVG lifetime | MIN lifetime | MAX lifetime
-------------------------------------------------------------------------------------------------------
HTML | Cache-Control + ETag + Last-Modified | 45 | 60 min | 60 min | 60 min
Image | Cache-Control + ETag + Last-Modified | 11 | 12 mon | 12 mon | 12 mon
JS | Cache-Control + ETag + Last-Modified | 4 | 12 mon | 12 mon | 12 mon
CSS | Cache-Control + ETag + Last-Modified | 2 | 12 mon | 12 mon | 12 mon
JSON | No cache headers | 1 | - | - | -
Domain | Cache type | URLs | AVG lifetime | MIN lifetime | MAX lifetime
-------------------------------------------------------------------------------------------------------------
example.com | Cache-Control + ETag + Last-Modified | 63 | 3 mon | 60 min | 12 mon
example.com | Cache-Control | 3 | 60 min | 60 min | 60 min
example.com | No cache headers | 1 | - | - | -
Domain | Content type | Cache type | URLs | AVG lifetime | MIN lifetime | MAX lifetime
-----------------------------------------------------------------------------------------------------------------------
example.com | HTML | Cache-Control + ETag + Last-Modified | 45 | 60 min | 60 min | 60 min
example.com | Image | Cache-Control + ETag + Last-Modified | 11 | 12 mon | 12 mon | 12 mon
example.com | JS | Cache-Control + ETag + Last-Modified | 4 | 12 mon | 12 mon | 12 mon
example.com | CSS | Cache-Control + ETag + Last-Modified | 2 | 12 mon | 12 mon | 12 mon
example.com | JSON | No cache headers | 1 | - | - | -

The analyzer identifies several caching strategies and combinations:

  • Cache-Control: Resources using the standard Cache-Control header
  • ETag: Resources using entity tag validation
  • Last-Modified: Resources using modification date validation
  • Cache-Control + ETag: Combined time-based and validation caching
  • Cache-Control + ETag + Last-Modified: Comprehensive caching approach
  • Expires: Resources using the older Expires header
  • No cache headers: Resources without any caching directives

The Caching Analyzer examines HTTP headers for each response, looking at:

  1. The presence and values of cache-related headers (Cache-Control, ETag, Last-Modified, Expires)
  2. Cache lifetime values (max-age, expires dates)
  3. Cache validation mechanisms (ETag, Last-Modified)
  4. Different caching strategies across content types and domains

The analyzer helps identify several optimization opportunities:

  1. Missing Cache Headers: Resources that should be cached but aren’t
  2. Short Cache Times: Resources with unnecessarily short cache lifetimes
  3. Inconsistent Caching: Different cache settings for similar resources
  4. Suboptimal Cache Strategies: Resources using less efficient caching methods

Based on the analysis, some recommended best practices include:

  • Static Assets: Use long cache times (1 year) for versioned static assets (CSS, JS, images)
  • HTML Content: Use shorter cache times (minutes to hours) with validation (ETag/Last-Modified)
  • API Responses: Use appropriate cache control based on data volatility
  • Consistent Strategy: Apply consistent caching policies across similar resource types
  • Combined Approach: Use both expiration (Cache-Control) and validation (ETag) mechanisms

Future enhancements to the caching analysis could include:

  • Specific recommendations for optimal cache settings by content type
  • Detection of common caching issues (too short, missing, conflicting)
  • Estimation of bandwidth and server load savings from optimized caching
  • Browser cache simulation to demonstrate the user experience impact
  • CDN-specific caching recommendations