Skip to content
ENExplore Calculators

Browser Cache Expiry Calculator

Set cache expiry headers and estimate the repeat-visit saving.

About Browser Cache Expiry Calculator

Long cache lifetimes are only safe when filenames change with content, which is what build-time hashing provides. With hashing, a one-year max-age is the standard recommendation. Caching is the cheapest performance win available, because repeat visitors download nothing at all for unchanged assets.

Formula

Browser Cache Expiry

Bandwidth saved = repeat visits × cacheable weight; max-age is expressed in seconds

content hashing
Filenames that change when content changes, making long expiry safe

Worked example

With the default values below, Browser Cache Expiry Calculator returns Monthly Bandwidth Saved of 41.199. Change any input above and every figure here is recalculated in your browser.

Inputs used

Cacheable asset weightminimum 0 KB
1,600 KB
Cache max-ageaccepts 0–3,650 days
365 days
Share of visits that are repeataccepts 0–100 %
45 %
Monthly visitsminimum 0
60,000
Connection speedminimum 0.01 Mbps
15 Mbps

Results

Monthly Bandwidth Saved
41.199 GB
Cache-Control max-age
31,536,000 s
Load Time Saved per Repeat Visit
853 ms
Repeat Visits per Month
27,000
Recommendation
Long expiry is correct provided filenames are content-hashed

Step by step

  1. 1Values used
  2. 2Browser Cache Expiry
  3. 3Monthly Bandwidth Saved= 41.199 GB
  4. 4Cache-Control max-age= 31,536,000 s
  5. 5Load Time Saved per Repeat Visit= 853 ms
  6. 6Repeat Visits per Month= 27,000
  7. 7Recommendation= Long expiry is correct provided filenames are content-hashed

Assumptions and limits

  • The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is Browser Cache Expiry calculated?

Bandwidth saved = repeat visits × cacheable weight; max-age is expressed in seconds Long cache lifetimes are only safe when filenames change with content, which is what build-time hashing provides. With hashing, a one-year max-age is the standard recommendation.

Why does Browser Cache Expiry matter?

Caching is the cheapest performance win available, because repeat visitors download nothing at all for unchanged assets.

What values do I need to enter?

This calculator takes 5 inputs: Cacheable asset weight, Cache max-age, Share of visits that are repeat, Monthly visits, Connection speed. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Browser Cache Expiry Calculator | Calcrivo