ATOMSEO
  • Log In
  • Sign Up
ATOMSEO

Understanding and Fixing Error 113:
Causes and Solutions

  1. What is the HTTP Status Code 113?

Error 113, "Heuristic Expiration," is an HTTP status code indicating that the cached content has expired based on heuristic calculations rather than explicit cache-control directives. This error helps inform clients that the content served might not be the most up-to-date.

Heuristic expiration occurs when a cache uses its algorithms to determine the freshness of cached content without specific expiration information (e.g., Cache-Control or Expires headers). This method estimates the appropriate time to consider content stale, typically based on factors like the last modification time.

Understanding HTTP code 113 involves recognizing the importance of explicit cache control directives and ensuring proper server configuration to effectively manage content freshness.

2. Causes of Code 113

1.     Missing Expiration Headers: The origin server does not provide explicit cache control headers, requiring the cache to rely on heuristic methods.

2.     Outdated Content: The heuristic calculation has deemed cached content stale, even though no specific expiration time was set.

3.     Server Configuration: The server may be configured to omit expiration headers intentionally or due to misconfiguration.

4.     Proxy Caches: Intermediate proxies applying heuristic methods to manage cached content without direct instructions from the origin server.

3. Practical Scenarios of the 113 Code

1.     Web Browsers: Browsers caching content without explicit expiration headers, using heuristic methods to decide when to refresh the content.

2.     Content Delivery Networks (CDNs): CDNs serving cached content based on heuristic expiration when origin servers do not provide specific cache control instructions.

3.     API Responses: APIs that do not specify caching policies, leading intermediaries to apply heuristic expiration to manage response freshness.

4. How to Fix Error Code 113?

To fix this issue, follow these steps:

1.     Set Explicit Cache-Control Headers: Ensure your server includes Cache-Control headers in the HTTP responses. These headers provide explicit instructions for caching behavior.

    Cache-Control: max-age=3600, must-revalidate

2.     Add Expires Headers: Use the Expires header to specify a precise expiration date and time for cached content.

    Expires: Wed, 21 Oct 2023 07:28:00 GMT

3.     Use ETag Headers: Implement ETag headers to help caches validate content freshness by comparing the current version with the cached version.

    ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"

4.     Optimize Server Configuration: Review and adjust your server configuration to ensure that cache control headers are correctly applied. This can involve updating server settings or modifying application logic.

5.     Regularly Update Content: Keep your content current to reduce the reliance on heuristic expiration. Regularly refreshing content ensures that clients receive the latest versions.

6.     Monitor and Audit Caching Behavior: Monitor your server's caching behavior and audit cache headers to ensure they are set correctly. Use tools like curl or browser developer tools to inspect HTTP responses.

        curl -I https://example.com

7.     Educate Development Teams: Ensure development teams understand the importance of setting proper cache control headers and follow best practices when deploying content.

Following these steps, you can effectively address error 113, ensuring that cached content remains fresh and up-to-date. Proper cache control settings and regular monitoring are critical to optimal caching performance.
Consistently monitoring web page statuses is crucial for promptly identifying and resolving issues. The Atomseo Broken Link Checker aids this process by providing up to 1,500 free daily scans. This tool enhances your website's performance by accurately detecting server errors, including HTTP code 113.

5. Learn More About Other 1xx Status Codes