问题
In Firefox 3.6 sessionStorage is not cleared when browser window is closed.
Can it be configured to be automatically cleared when browser closes?
It can be manually cleared on "onunload" event but still.
回答1:
It is persisted by the session restoration feature in Firefox. If you don't use that, it should not be persisted.
回答2:
Disabling session store will prevent session data to be saved in the future. I figure it will also delete the old data, since there does not appear to be an item for that in "Clear recent history": Screenshot
But you might want to perform such a clearing with all the items checked. (Still I'm not sure that would purge the old session data.)
If you have a session management extension installed, you will probably have to go through further steps to erase all data (and prevent it from being created in the future).
来源:https://stackoverflow.com/questions/5141331/firefox-3-6-sessionstorage-persists-between-browser-sessions