Website Screenshot Cache for Faster Performance

Use the Add Screenshots website screenshot cache to reuse captures, accelerate reporting, and eliminate duplicate API work. Configure TTL values per request, deliver from Cloudflare's global edge, and keep workflows moving with no throttling or concurrency caps.

Enable Caching on the Free Plan or See Plan Limits

Why Caching Screenshots is Important

Caching website screenshots with Add Screenshots is a powerful technique to boost performance and minimize API usage. By storing screenshots of your web pages, you avoid generating the same screenshots repeatedly, which can be resource-intensive and slow operations.

Implementing screenshot caching not only speeds up the process but also reduces the load on your servers and network. This is particularly valuable for monitoring websites, quality assurance, and analytics where frequent screenshots of unchanged content can be avoided.

  • Configurable TTL: Set the ttl parameter per request to control exactly how long a capture stays fresh.
  • Global delivery: Cloudflare edge caching returns the closest copy to your users for low latency.
  • Flexible storage: Pair caching with AWS S3, Azure Blob Storage, Google Cloud Storage, or Cloudflare R2 for longer retention.
  • Change monitoring ready: Cache frequent captures while still using visual diff alerts when a site updates.

How to Enable Screenshot Caching

To enable caching for your website screenshots, use the ttl (Time To Live) URL parameter to specify the duration in seconds for which the screenshot should be cached.

For example, setting &ttl=30 will cache the screenshot for 30 seconds. This means if you request the same screenshot within this period, you'll receive the cached version instead of generating a new one.

Example of a Cached Screenshot Request

To request a screenshot of google.com and cache it for one day (86400 seconds), use the following request:

// Example request for a daily cached screenshot https://api.addscreenshots.com/screenshots
?apikey=
YOUR_API_KEY
&ttl=86400
&url=google.com

Your API key can be found on the API Keys page. Need an API Key? Sign up to get started.
For internal applications, replace YOUR_API_KEY with your own unique API Key.
For public facing websites or hotlinks, generate a signed URL.

Common Cache Durations

Here are some typical Time To Live (TTL) values for caching durations:

Cache DurationURL Parameter
10 minutes&ttl=600
1 hour&ttl=3600
1 day&ttl=86400
1 week&ttl=604800
1 month&ttl=2592000

Default Cache Settings

By default, screenshots are not cached. This ensures that each request returns the most current version of the page, which is ideal for dynamic or frequently updated content. However, for static or less frequently changing pages, enabling caching can significantly enhance performance and reduce API consumption.

Using Your Own CDN for Caching

Yes, you can use your own Content Delivery Network (CDN) to cache screenshots. Storing screenshots on platforms like Azure Blob Storage or an AWS S3 Bucket and pointing your CDN to these storage accounts gives you full control over caching and delivery.

How Caching Works

Here's a quick overview of the caching process:

  1. Receive the screenshot request with URL and options (e.g., quality, format, viewport)
  2. Check if a cached screenshot exists for the requested URL and TTL
  3. Return the cached screenshot if available and valid
  4. If no valid cached screenshot is found, capture a new screenshot
  5. Store the new screenshot in the cache
  6. Return the newly captured screenshot

Where Are Cached Screenshots Stored?

Cached screenshots are stored using Cloudflare, ensuring efficient delivery and access.

Limitations of Screenshot Caching

Be aware of the following limitations:

  1. Only GET requests are supported for caching (POST requests are not cached)
  2. Caching is available only for active accounts

Benefits of Caching

Implementing caching for website screenshots offers significant benefits, including improved performance, reduced API usage, and lower operational costs. By avoiding redundant screenshot generation, you can streamline your processes and ensure faster access to static content.


Website Screenshot Cache FAQs

How do I enable caching for website screenshots?

Add the ttl parameter to your API request to define how long the screenshot stays in cache. Any request made before the TTL expires delivers the cached capture instantly.

Where are cached website screenshots stored?

Cached screenshots are served from Cloudflare's global edge network so stakeholders receive low-latency responses worldwide.

Can I use my own CDN with the screenshot cache?

Yes. Store captures in AWS S3, Azure Blob Storage, Google Cloud Storage, or Cloudflare R2 and place your CDN in front to control retention and delivery rules.