Skip to content

Document cache-control best practice #20064

@oliviertassinari

Description

@oliviertassinari

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

There is a best practice around Vite hosting:

/assets/*
cache-control: max-age=31536000
cache-control: immutable

Your Suggestion for Changes

I believe the docs should cover it in https://vite.dev/guide/static-deploy.html.

Next.js kind of does it, but not really: https://nextjs.org/docs/app/guides/self-hosting#automatic-caching. I guess it's not in their best interest to document this (for Vercel).

Reproduction

No response

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions