Reputation: 34627
Acc. to this the best way to introduce ?<version>
number upon every reload. How do I do that when rendering files with Jade in Node.js?
Also what about css files?
Upvotes: 1
Views: 561
Reputation: 34627
Figured out, I could add time
app.configure(function() {
//...
app.use(setlocalTime);
//...
app.use(app.router);
});
function setlocalTime(req, res, next) {
app.locals.time = Date.now();
next();
}
script(src='/scripts/script.js?'+time)
Upvotes: 1