title: Can't delete cookie in express
body: <p>Pretty simple. I set a cookie like so in my <code>/user/login</code> route:</p>
  
  <pre><code>if (rememberMe) {
      console.log('Login will remembered.');
      res.cookie('user', userObj, { signed: true, httpOnly: true, path: '/' });
  }
  else {
      console.log('Login will NOT be remembered.');
  }
  </code></pre>
  
  <p>I've already set my secret for cookie-parser:</p>
  
  <pre><code>app.use(cookieParser('shhh!'));
  </code></pre>
  
  <p>Pretty basic stuff. Everything is working great insofar as I'm able to retrieve whatever I stored in the cookie:</p>
  
  <pre><code>app.use(function (req, res, next) {
      if (req.signedCookies.user) {
          console.log('Cookie exists!');
          req.session.user = req.signedCookies.user;
      }
      else {
          console.log('No cookie found.');
      }
  
      next();
  });
  </code></pre>
  
  <p>This middleware is called before anything else, so for the sake of the argument "Cookie exists!" is always logged in my console if the cookie is valid. </p>
  
  <p>The problem is when I try to delete the cookie. I've tried <code>res.clearCookie('user')</code>, <code>res.cookie('user', '', { expires: new Date() })</code>, and I've tried passing in the same flags (that I pass to <code>res.cookie()</code> in <code>/user/login</code>). I've attempted to use combinations of these methods, but nothing has worked.</p>
  
  <p>Currently, the only way I am able to clear the cookie (and not receive the "Cookie exists!" log message) is by clearing my browser history. Here is what my logout route looks like:</p>
  
  <pre><code>route.get('/user/logout', function (req, res, next) {
      res.clearCookie('user');
      req.session.destroy();
      util.response.ok(res, 'Successfully logged out.');
  });
  </code></pre>
  
  <p>It seems as though I can't even modify the cookie value; I put </p>
  
  <p><code>res.cookie('user', {}, { signed: true, httpOnly: true, path: '/' })</code> </p>
  
  <p>in my logout route, but the cookie value remains unchanged.</p>