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

It’s per domain and port (the same segregation rules as the same origin policy), to make it per-page you’d have to use a key based on the location, or some other approach.

You don’t need a prefix, use one if you need it though. Also, yes, you can name them whatever you want.

Leave a Comment