Start a project

Tool 187 of 425 · Caching

Vary Header Cache-Key Explainer

Shows the cache key and variant each request gets under your Vary header and warns about values that wreck hit rates.

Vary Header Cache-Key Explainer

Your input

Result

RequestKey partsVariant

    01

    What it does

    Shows the cache key and variant each request gets under your Vary header and warns about values that wreck hit rates.

    • Groups sample requests into variants
    • Accept-Encoding normalisation
    • User-Agent, Cookie and * warnings
    • CDN-specific notes

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    A variant per request and warnings, with a Copy and a Download button on every result.

    • Vary header
    • CDN caching
    • Cache key

    Why it matters

    Vary tells caches to store a separate copy per value of a request header. One careless Vary: User-Agent can drop a CDN hit rate to near zero.

    Paste a few realistic requests to see how many copies your header would create.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Explain cache keys. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    Does Cloudflare respect Vary?

    Mostly for Accept-Encoding only, plus Accept for images with Vary for Images. Use a custom cache key for anything else.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk