Alex Rivera | Logout

In HTML5, is the localStorage object isolated per page/domain?

Asked 2010-11-17T03:33:57.003
238

Is the HTML5 localStorage object isolated per page/domain? I am wondering because of how I would name localStorage keys. Do I need a separate prefix? Or can I name them whatever I want?

Edit
Report

1 Answer

-1

It is available anywhere on that domain as Nick suggested, as an alternative there is sessionStorage works slightly differently in that it is distinct to the browser window itself. That is to say that other tabs or windows on the same domain do not have access to that same copy of the storage object.

answered 2011-10-14T04:05:55.860

Your Answer