At times during development, it would be really nice to prevent HTTP 304 responses (in favor of 200's), and cause the Connect/Express static middleware to read every response from the filesystem, rather than do any caching at all.
I have tried playing with maxAge
values of 0 and 1, to no avail:
app.use(express.static(__dirname + '/public', { maxAge: 1 }))
I get 200 responses by doing this during development :
var express = require('express');
app = express();
app.use(function(req, res, next) {
req.headers['if-none-match'] = 'no-match-for-this';
next();
});
app.disable('etag');
preventing 'etag' in response may help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With