Quantcast
Channel: Node.js express force client to skip cache (refresh) - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by O. Borcuhin for Node.js express force client to skip cache (refresh)

Looks like, you need to add 'Cache-Control': 'no-cache' to you the sendFile() options:const options = { headers: {'Cache-Control': 'no-cache', }};res.sendFile(file, options, (err) => { if (err) {...

View Article



Node.js express force client to skip cache (refresh)

I'm sending a file in node.js / express like this:res.header("Content-Type", mime.lookup(file));res.sendFile(file);On sever side I can detect if that file has changed and I want to force client to skip...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images