Skip to content

[docs-infra] Prefix /_next/static cache header rule with /x basePath#22748

Merged
brijeshb42 merged 1 commit into
mui:masterfrom
brijeshb42:fix/x-basepath-cache-headers
Jun 11, 2026
Merged

[docs-infra] Prefix /_next/static cache header rule with /x basePath#22748
brijeshb42 merged 1 commit into
mui:masterfrom
brijeshb42:fix/x-basepath-cache-headers

Conversation

@brijeshb42

@brijeshb42 brijeshb42 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the previous cache-header fix. The docs deploy under basePath /x, so assets are actually served at /x/_next/static/... — the bare /_next/static/* rule never matched, leaving hashed assets at max-age=0,must-revalidate.

Adds the /x-prefixed rule and keeps the bare one as a safety net.

Confirmed broken on prod: curl -sI https://mui.com/x/_next/static/css/*.cssmax-age=0.
Verify after deploy → expect immutable.

@brijeshb42 brijeshb42 added the scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). label Jun 11, 2026
@brijeshb42
brijeshb42 requested a review from a team June 11, 2026 04:10
@brijeshb42 brijeshb42 added the type: bug It doesn't behave as expected. label Jun 11, 2026
The docs deploy under basePath /x, so assets are served at
/x/_next/static. Keep both rules so hashed assets get immutable caching
regardless of the served prefix.
@brijeshb42
brijeshb42 force-pushed the fix/x-basepath-cache-headers branch from ec1c5c6 to 332dd8f Compare June 11, 2026 04:11
@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-22748--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 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 7f374c9 into mui:master Jun 11, 2026
22 checks passed
@brijeshb42
brijeshb42 deleted the fix/x-basepath-cache-headers branch June 11, 2026 04:50
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). type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants