Google News
logo
Next.js - Interview Questions
How can you disable the etag generation in Next.js?
Generally, we use the app.disable('etag') syntax to disable the etag generation in Next.js. But, this may not work for all static contents. So, we should use the following syntax to disable the etag for all static contents.
 
Syntax :
app.use(express.static(path.join(__dirname, 'public'), {  
etag: false  
})); ​
 
Advertisement