Cache Header Lab

Cache Header Lab

Enter an initial GET/200 and a later GET to build a cache timeline.

A bounded local teaching model of RFC 9111. It does not communicate with a real cache, origin or CDN and does not certify production configuration.

1. Initial GET and 200 response

This timestamp is interpreted as UTC without converting your local time.

One Name: value per line. ASCII headers, at most 8 KiB and 30 lines per block. Use only supported Cache-Control directives.

2. Later GET and proposed origin response

For 304, provide an ETag or Last-Modified matching the stored response. A 200 is shown only as a replacement.

Review the fields and run the cache simulation.

HTTP specification

Comments & questions

Cache Header Lab

Place an initial GET/200 response and a later GET in the same cache. Calculate whether storage and reuse are possible, how Vary and Age affect freshness, and which conditional headers a validation request would carry.

Key features

  • Distinguish no-store, private and Authorization storage rules for private or shared caches
  • Calculate age and freshness from Date, Age, max-age, s-maxage and Expires
  • Select a reusable representation with URL and Vary request headers
  • Generate ETag or Last-Modified conditional headers and check a hypothetical 304 validator
  • Run fixed fresh, stale, no-store and Vary mismatch examples without network requests

How to use

  1. Enter initial GET headers, 200 response headers and the UTC time the response arrived.
  2. Select a private or shared cache, elapsed seconds, whether the URL is the same and later GET headers.
  3. Optionally assume a 304 or 200 origin response and enter the 304 validator headers.
  4. Run the simulation and inspect storage, freshness, conditional headers and the timeline.

Use cases

  • See why max-age=60 becomes stale at exactly 60 seconds
  • Estimate remaining freshness when an upstream Age is already 20 seconds
  • Review why a shared cache cannot store private or unpermitted Authorization responses
  • Reproduce a cache miss when Accept-Language changes under Vary

Frequently asked questions

Does this send a real request?

No. It calculates only the supplied headers and times in browser memory. It cannot confirm CDN configuration, service workers, browser policy or a real origin response.

Are no-cache and no-store equivalent?

No. In this model no-store prevents storage. A response with no-cache can be stored but needs origin validation before reuse. A later no-cache request also requires validation even for a fresh stored response.

How are Age and Date combined?

Initial age at receipt is the larger of the Age field and apparent age from Date to receipt time. Elapsed seconds are then added. Network transit and detailed multi-cache timing are assumed to be zero.

Does a displayed 304 prove that the origin content is unchanged?

No. You choose a hypothetical 304, and reuse is shown only if its ETag or Last-Modified matches the stored response. The tool does not contact the origin or merge all 304 metadata.

Which cache behavior is excluded?

Only one GET/200 and one later GET are modeled. Heuristic freshness, stale extensions, Range/206, redirects, preexisting conditional request fields, browser partitioning and post-304 metadata merging are excluded. Unsupported Cache-Control directives are rejected.

Privacy

Input is processed only in this browser tab's memory; no URL is fetched and no header is uploaded or saved. Avoid real Authorization or personal values. A conditional request preview can show an ETag you entered.

Related Tools

HTTP Archive AnalyzerCurl Request WorkbenchHTTP Status Code LookupWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorCoordinate Reference LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerGeoJSON Map EditorPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →