Image caching

TL;DR The interesting code is in scripts/bootstrap.js

This page loads 5 images. Three are specified in a remote manifest.json file, one is added from the img tag in the page and the final one comes from an object created in JavaScript. These are the three ways to get images.

Image 1 should never cache. That is, the headers that come back from the server should set no-cache for it. This triggers a warning, because we can't save the image for offline.

All other images are given somewhere between 60 and 180 seconds as their max-age. You can see the images saved in the filesystem along with an additional file stored in the root which contains the details on all files we've saved.

If the manifest or a file is removed, or a file has expired, the browser will request it again from the server. If it is not possible to retrieve a new copy of the file then the old one is served.

Warnings