Skip to content
Product and web UIguide

How to cache versioned icons across deployments

By SkeuDesign Editorial Team1 min read

Answer in brief

Use a content-dependent filename for immutable artwork and change the reference when the pixels change. A long cache lifetime is appropriate only when a URL will continue to represent the same bytes.

Roll out a revised calendar icon

Deploy calendar.a1.png, then publish the revision under calendar.b2.png and update the markup. Keep the older file available for pages still referencing it. Inspect the response Cache-Control header on each version.

Keep old files through the release transition

An open tab can request a previously unseen icon after a new build is live. Load the old page before deployment, leave its lower gallery unvisited, then scroll down after deployment. If those thumbnails fail, the host discarded files while active pages could still reference them.

Sources

  1. [1] Cache-Control header - HTTP — MDN Web Docs, accessed November 23, 2026

Frequently asked questions

Can I reuse the old filename and rely on a hard refresh?

Visitors with fresh cached responses can continue seeing the old pixels. A new resource URL makes the revision explicit.