Question

I'm running express server using command:

     forever -o /var/www/html/expressapp/out.log 
     -e /var/www/html/expressapp/err.log 
     start /var/www/html/expressapp/index.js -w

Node v0.8.15

Browser shows very old error message occasionally, but not every time when I go to one page which uses jade-template. I've fixed the error long time ago but it still appears some times. I've tried with different browsers and cleaned every log file in server but I can't get rid of the message. I've changed the file name too..

Please help!

Was it helpful?

Solution

This fixed the problem:

    app.disable('view cache'); 
    res.setHeader("Cache-Control", "public, max-age=0"); 
    res.setHeader("Expires", new Date(Date.now()).toUTCString());
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top