Skip to content

Conversation

benjavicente
Copy link
Contributor

@benjavicente benjavicente commented May 2, 2025

@benjavicente
Copy link
Contributor Author

Opened a PR on the starter template: cloudflare/workers-sdk#9131

@benjavicente benjavicente requested a review from vicb May 5, 2025 12:21
@benjavicente
Copy link
Contributor Author

The closest docs about Next.js's immutable cache header is on the Next.js 13 Pages Router production checklist:

Caching improves response times and reduces the number of requests to external services. Next.js automatically adds caching headers to immutable assets served from /_next/static including JavaScript, CSS, static images, and other media.

Cache-Control: public, max-age=31536000, immutable

On the Next.js 15 App Router docs, only the header is mentioned. I'm trying to confirm that ALL files inside /_next/static are immutable in modern versions of Next.js, but with the old documentation and that I couldn't find a production Next.js site without a file in on /_next/static/* that didn't have a hash on its path or it's missing that header, I believe it's ok to add this default.

@vicb
Copy link
Contributor

vicb commented May 5, 2025

Thanks for the PR Benjamin, I'll merge when the test result comes.

@vicb vicb merged commit ee3bb9c into opennextjs:main May 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants