Wednesday, December 14, 2011

Firefox 8.0.1 - cookies play important role for web storage!

I read online article somewhere asking where the Web Storage data are stored. During my research I encountered interesting facts that deleting cookies cause sessionStorage data to be removed and this behavior differs per browser (IE, Chrome, Firefox).

I tested Firefox 8.0.1 with 2 ways.

Case 1
1. create localStorage data, sessionStorage data
2. remove all cookies using browser
Case 2
1.create localStorage data, sessionStorage data
2. remove cookies.sqlite from my firefox profile directory.
(i.e. C:\Users\masatosan\AppData\Roaming\Mozilla\Firefox\Profiles\1nc1d3r.default\cookies.sqlite)

Case 1 results in both data in localStorage and sessionStorage be removed.
Case 2 does not seem to have effect. Local storage persists and session storage is removed when I had to close the Firefox to delete mysqlite file.

You can use demo below:

  • generate button - creates session/local storage data
  • 2 text fields displays the session/local storage data

You can click on generate and try removing cookies in anyway and reload the page to see what will happen.



session
local

1 comment: