---
title: "Discussion on \"Client-Side Storage in JavaScript\" | Hashnode"
description: "Discussion on \"Client-Side Storage in JavaScript\". Hello and welcome to the 2nd article of the #2Articles1Week challenge series! I'm very excited to partake in this challenge. If you haven't heard about the #2Articles1Week challenge, learn more about it here.\n\nFirstly, thank you to everyone who read ..."
url: "https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Client-Side Storage in JavaScript](https://blog.lo-victoria.com/client-side-storage-in-javascript?utm_source=hashnode&utm_medium=feed)

Hello and welcome to the 2nd article of the #2Articles1Week challenge series! I'm very excited to partake in this challenge. If you haven't heard about the #2Articles1Week challenge, learn more about it here. Firstly, thank you to everyone who read ...

Jul 12, 2020 · 5 min read · blog.lo-victoria.com  
Updated Jul 22, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#storage](https://hashnode.com/tag/storage)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Victoria Lo](https://hashnode.com/@victoria)

@victoria · Singapore

  
[View profile](https://hashnode.com/@victoria)

A nerd in books, tea, games and software.

I'm a solutions engineer lead, GitHub Star, Director of WomenDevsSG, and co founder of ragTech. I work at the intersection of tech, systems, and leadership, and this blog is where I share my journey through all three. Expect honest reflections, real experiences, and thoughts that are still forming rather than polished career advice.

## Responses 4

Markdown supported · ⌘↵ to post

[Osinachi Chukwujama](https://hashnode.com/@Vicradon)

[Jul 14, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0d6c5802afcd6941857767)

Thank you for this post, Victoria

You said something about localStorage being accessible anywhere on the browser.

Can you give more insights on this?

[Victoria Lo](https://hashnode.com/@victoria)

[Jul 14, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0d6c5802afcd6941857767#reply-5f0d8a4252084a76c4ac0dd8)

Sure! I can illustrate this using the Inspector Window. If you are unsure of what it is: visit [here](https://ui.vision/howto/view-local-storage).

For localStorage, you can access and view it on the Inspector Window. It will be there, 1 localStorage shared across all your tabs. Data persists even after the browser closes and opens again.

For sessionStorage, you can view it on the Inspector too however, you will notice each page will have its own sessionStorage and its data would disappear if the page/browser is closed.

[Osinachi Chukwujama](https://hashnode.com/@Vicradon)

[Jul 14, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0d6c5802afcd6941857767#reply-5f0dab1e52084a76c4ac0eb6)

[Victoria Lo](https://hashnode.com/@victoria) I think I get it now.

You mean for the same web address, the localstorage is shared across multiple tabs

I previously thought you meant the data in localstorage from one web address can be accessed by another

[Victoria Lo](https://hashnode.com/@victoria)

[Jul 14, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0d6c5802afcd6941857767#reply-5f0db78452084a76c4ac0f28)

[Osinachi Chukwujama](https://hashnode.com/@Vicradon) Yes it's per domain and port (like [same origin policy](https://en.wikipedia.org/wiki/Same-origin_policy)).

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Jul 13, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0c579e1c0d706231f763e1)

This was worth my time, gave it a share also. Thank you for sharing :)

[Ben](https://hashnode.com/@fullsnacktester)

[Jul 13, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0c14253fe8405bdb8d81f5)

Thank you. Great article. I love the "CRUD Examples" format. I hope you don't mind if I borrow that some of my posts.

[Victoria Lo](https://hashnode.com/@victoria)

[Jul 13, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0c14253fe8405bdb8d81f5#reply-5f0c63da880268625262bba6)

No problem! Feel free to use it!

[Mohammed Jabali](https://hashnode.com/@Jabali)

[Jul 13, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0bdaa63fe8405bdb8d810b)

Thank you. Your article is very helpful.

I noticed this issue:

```
let openRequest = indexedDB.open('database', 1);
// users is the database name and 1 is the version
```

There is no "users" in your code.

[Victoria Lo](https://hashnode.com/@victoria)

[Jul 13, 2020](https://hashnode.com/posts/client-side-storage-in-javascript/5f0af50bf80d68509e50d165/comment/5f0bdaa63fe8405bdb8d810b#reply-5f0bdd273fe8405bdb8d8118)

Thanks for pointing that out! I have corrected it :)
