Skip to content

[docs-infra] Infinitely cache all static assets#48627

Merged
brijeshb42 merged 1 commit into
mui:masterfrom
brijeshb42:static-cache
Jun 6, 2026
Merged

[docs-infra] Infinitely cache all static assets#48627
brijeshb42 merged 1 commit into
mui:masterfrom
brijeshb42:static-cache

Conversation

@brijeshb42

@brijeshb42 brijeshb42 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cache-Control rule in docs/public/_headers now targets /_next/static/ instead of /_next/*.js.
  • All static assets under /_next/static/ (JS, CSS, fonts, media) get public, max-age=31536000, immutable instead of only .js files.

Why

Next.js content-hashes every file under /_next/static/, so the contents are immutable and safe to cache forever. The previous glob only matched .js, leaving CSS and other hashed assets uncached.

@brijeshb42 brijeshb42 added the scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). label Jun 6, 2026
@brijeshb42 brijeshb42 requested a review from a team June 6, 2026 15:07
@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48627--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@brijeshb42 brijeshb42 merged commit 61b3940 into mui:master Jun 6, 2026
18 of 19 checks passed
@brijeshb42 brijeshb42 deleted the static-cache branch June 8, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants