1

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?

Community
  • 1
  • 1
laggingreflex
  • 26,275
  • 28
  • 123
  • 172

1 Answers1

1

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)
laggingreflex
  • 26,275
  • 28
  • 123
  • 172