Missing Cache-Control headers
Hi,
There’s quite a few responses that are missing Cache-Control
headers. Especially the 404 not found responses (default image), redirects, and even when an avatar image is found and served.
Secondarily, the cache efficiency can be increased significantly by adding stale-while-revalidate
handling (e.g. Cache-Cotrol: max-age=600,stale-while-revalidate=259200
.) Intermediary caches and even browsers will keep using a cached image and revalidate and update the cached image in the background. (So, the page load isn’t delayed after the max-age
has expired.) It lets you keep a short 15-min max-age while still letting browsers use a cached image for a month.