next.config.js permanent file redirect cache
Answered
mehha posted this in #help-forum
mehhaOP
In my next.config.js I have redirect to pdf file which is in my public folder. How can I can disable cache for example if I change this pdf file to new version?
const nextConfig = {
output: 'standalone',
async redirects() {
return [
{
source: '/lorem',
destination: '/lorem.pdf',
permanent: true,
},
]
},
}
module.exports = nextConfig
const nextConfig = {
output: 'standalone',
async redirects() {
return [
{
source: '/lorem',
destination: '/lorem.pdf',
permanent: true,
},
]
},
}
module.exports = nextConfig
Answered by riský
it would be browser level cache (so nothing on server you can do) so thats why i dont use permanent unless i really know i wont change it again
1 Reply
it would be browser level cache (so nothing on server you can do) so thats why i dont use permanent unless i really know i wont change it again
Answer