cookie-session doesn't save session modification
<p>I wanted to remember the last page someone visited (<a href="http://blog.modulus.io/nodejs-and-express-sessions" rel="nofollow noreferrer">like here</a>)<br>
I tried to do it with cookie-session but It's doesn't work as I a suppose.</p>

<p>I saw <a href="https://stackoverflow.com/questions/33169002/renewing-cookie-session-for-express-js">this</a> and I tried <a href="https://github.com/bryce-gibson/cookie-session/commit/b92093502ea0127c2043c4d86ac3a785f1cf6c7f?short_path=04c6e90#diff-04c6e90faac2675aa89e2176d2eec7d8" rel="nofollow noreferrer">this example</a> for extending the session without success.</p>

<p>Here the code :</p>

<pre><code>var session = require('cookie-session');
var express = require('express');

var app = express();

app.use( session({ secret: 'secret' }) );


app.get('/a', function (req, res) {
  if(req.session.last) {
    res.write("the last page was " + req.session.last + ". ");
  }  
  req.session.last = "a";
  res.end("Page A");  
});

app.get('/b', function (req, res) {
  if(req.session.last) {
    res.write("the last page was " + req.session.last + ". ");
  } 
  req.session.last = "b";  
  res.end("Page B");
});

app.get('/c', function (req, res) {
  if(req.session.last) {
    res.write("the last page was " + req.session.last + ". ");
  } 
  req.session.last = "c";  
  res.end("Page C");
});

app.listen(8080);
</code></pre>