Cache & compression
A step of the Cloud application tree on Gradus, in the Frontend area: Second app, UI, browser tests.
Let browsers keep hashed assets for a year and always check the HTML, and compress what is sent.
Usually comes after: Deploy the frontend.
Prompt for your AI assistant
List the files the frontend serves and how each one is named. Send hashed assets with Cache-Control: public, max-age=31536000, immutable, version or config files the page polls with no-store and HTML with no-cache so a new release reaches everyone on the next load. Make sure a file without a hash in its name is never cached for long. Serve HTML, JavaScript, CSS, SVG and JSON compressed with Brotli or gzip. Add a post-deploy check that fetches one file of each kind with an Accept-Encoding header and compares its Cache-Control and Content-Encoding with what this step decided, and write the rules into docs/.This is https://gradus.kazet.blog/tree/cloud-application/step/cache-headers as plain HTML. In a browser the page also lets you mark the step forged and copy a message for your AI assistant.