alphagov / govuk-frontend-docs

Technical documentation for GOV.UK Frontend
https://frontend.design-system.service.gov.uk/
33 stars 11 forks source link

Add caching headers for fingerprinted assets #383

Closed romaricpascal closed 6 months ago

romaricpascal commented 7 months ago

What

Have Netlify respond with the following Cache-Control headers for the assets that are fingeprinted (either by the tech_docs_gem, if any, or already fingerprinted ones, like the fonts):

public,max-age=2147483648,immutable

Why

Beyond being good caching practice for ourselves, we want our sites to be a good example of how to set up headers for assets caching, in case people copy it.

Fingerprinted assets can be cached forever by the browser and our headers should reflect that.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when