How long dose browser keep data in session

Jun 11, 2015

Background

I develped some web applications. This application use session cookie. I expected session cookie data is deleted when user close browse window.

But browser keep having data after closing browser window. I wonder how long dose browser keep data in client storage.

Outline

survey how long dose typical bower storage keep data.

Survey

browser

All in mack.

Target

How to

check the data is stil alive after those actions.

test page

http://jsbin.com/mitila/

this page..

Result

summary

If you want to delete data in client after session Sessionstorage is best but you need to implement expire logic to delete data. Because some browsers did not delete data after session.

e.g.

SessionStorage was not deleted afeter back to home screen and return browser window in iOS safari, iOS chrome.

Data

Expected result

  reload new window close restart
session cookie
permanent cookie
session storage
local storage

Chrome

  reload new window close restart
session cookie ●? ●?
permanent cookie
session storage
local storage

Firefox

  reload new window close restart
session cookie ●? ●?
permanent cookie
session storage
local storage

Safari

  reload new window close restart
session cookie ●? ●?
permanent cookie
session storage
local storage

iOS safari

  reload new window close restart
session cookie ●? ●?
permanent cookie
session storage ●?
local storage

iOS chrome

  reload new window close restart
session cookie ●? ●? ●?
permanent cookie
session storage ●?
local storage