How to enforce new SessionId on every tab?

18 views
Skip to first unread message

mathias

unread,
Jan 25, 2019, 6:28:47 AM1/25/19
to vert.x
Currently the sessionId set by vertx-web SessionHandler is the same for all tabs running in a chrome instance. How to enforce seperate Sessions on each tab?

mathias

unread,
Jan 25, 2019, 6:47:23 AM1/25/19
to vert.x
I just noticed that the expire date of the vertx web session cookie gets set to 1969-12-31T23:59:59.000Z by the server after successful login.
  1. Why does vertx set the expire date of the web session cookie to 1969?
  2. Why does Chrome not delete this expired cookie?
  3. Even stranger: Why does Chrome sends the session cookie on every request even though it has expired


Paulo Lopes

unread,
Jan 25, 2019, 7:38:26 AM1/25/19
to vert.x
Sessions are tracked by cookies, which are issued for a specific subdomain or/and path.

since probably you're using the same cookie handler for all routes they paths are the same so your browser shares the cooke across the tabs.

Paulo Lopes

unread,
Jan 25, 2019, 7:39:30 AM1/25/19
to vert.x
The expiration is in the past to ensure that on browser close/tab close it will not be persisted.

mathias

unread,
Jan 26, 2019, 4:19:26 AM1/26/19
to vert.x
Alright, thanks!
Reply all
Reply to author
Forward
0 new messages