{"action":"created","issue":{"url":"https://api.github.com/repos/expressjs/session/issues/241","labels_url":"https://api.github.com/repos/expressjs/session/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/session/issues/241/comments","events_url":"https://api.github.com/repos/expressjs/session/issues/241/events","html_url":"https://github.com/expressjs/session/issues/241","id":121523713,"number":241,"title":"Cookie should expire immediately when session is destroyed","user":{"login":"JamesMGreene","id":417751,"avatar_url":"https://avatars.githubusercontent.com/u/417751?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesMGreene","html_url":"https://github.com/JamesMGreene","followers_url":"https://api.github.com/users/JamesMGreene/followers","following_url":"https://api.github.com/users/JamesMGreene/following{/other_user}","gists_url":"https://api.github.com/users/JamesMGreene/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesMGreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesMGreene/subscriptions","organizations_url":"https://api.github.com/users/JamesMGreene/orgs","repos_url":"https://api.github.com/users/JamesMGreene/repos","events_url":"https://api.github.com/users/JamesMGreene/events{/privacy}","received_events_url":"https://api.github.com/users/JamesMGreene/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/expressjs/session/labels/ideas","name":"ideas","color":"d7e102"}],"state":"open","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-12-10T16:22:01Z","updated_at":"2016-01-06T16:36:07Z","closed_at":null,"body":"I believe that the session cookie should be forced to immediately expire when the session is destroyed (i.e. when the user logs out) on the server-side.\r\n\r\nWhile the Session Store I am using is correctly handling this such that a subsequent request from the same client would create a new cookie/session, having the existing cookie for the now-destroyed session be forcibly expired keeps things much cleaner and clearer on the client-side.\r\n\r\nDoing so also avoids wasting some bytes on the network bandwidth of _every_ outgoing request from the client by not including the irrelevant cookie.  If the session has been destroyed but the cookie's normal expiration date has not yet been reached, this can contribute an undesirable amount of unnecessary upload bytes incurred from the client's outgoing requests due to always being required to include that irrelevant cookie in the `Cookie` header until it naturally expires.\r\n\r\nWhen combined with my changes in PR #240 to fix the interaction between `rolling: true` and `saveUnitialized: false`, fixing this would keep things significantly cleaner on the client-side."},"comment":{"url":"https://api.github.com/repos/expressjs/session/issues/comments/169381798","html_url":"https://github.com/expressjs/session/issues/241#issuecomment-169381798","issue_url":"https://api.github.com/repos/expressjs/session/issues/241","id":169381798,"user":{"login":"JamesMGreene","id":417751,"avatar_url":"https://avatars.githubusercontent.com/u/417751?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesMGreene","html_url":"https://github.com/JamesMGreene","followers_url":"https://api.github.com/users/JamesMGreene/followers","following_url":"https://api.github.com/users/JamesMGreene/following{/other_user}","gists_url":"https://api.github.com/users/JamesMGreene/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesMGreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesMGreene/subscriptions","organizations_url":"https://api.github.com/users/JamesMGreene/orgs","repos_url":"https://api.github.com/users/JamesMGreene/repos","events_url":"https://api.github.com/users/JamesMGreene/events{/privacy}","received_events_url":"https://api.github.com/users/JamesMGreene/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T16:36:07Z","updated_at":"2016-01-06T16:36:07Z","body":"@dougwilson Ping-a-ling-a-ling. :blush:"}}