Next.js Discord

Discord Forum

Problem Cache-control: no-cache in production

Unanswered
Devon Rex posted this in #help-forum
Open in Discord
Devon RexOP
Hello,

I have a website that has been migrated to nextjs 15, however when deploying it to production, I can see that the cache-control is set to no-cache on the main page (first ressource downloaded).

I am using the standalone output from nextjs config

How can I change it?

I did double check and the page is using a static routing as per the toolbar

2 Replies

you usually dont want browser cache for pages unless you know what your doing - as it makes it harder to update to new version and a lot of things (static files with hash in name are way safer as u dont need it to change ever)

however, i think you maybe can use next.config.js to set the headers manually
@risky you usually dont want browser cache for pages unless you know what your doing - as it makes it harder to update to new version and a lot of things *(static files with hash in name are way safer as u dont need it to change ever)* however, i think you *maybe* can use next.config.js to set the headers manually
Devon RexOP
Thanks for the answer and I agree with you, however as I have a very big load of users, I would prefer to not have to override it through cloudflare and set it to 300s caching to avoid workload