---
title: "Discussion on \"The Web Storage API\" | Hashnode"
description: "Discussion on \"The Web Storage API\". Browser APIs are APIs that are natively built into web browsers, allowing for more robust features to be made available on the web"
url: "https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4"
---

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

Discussion

# [The Web Storage API](https://oyinbayode.hashnode.dev/the-web-storage-api?utm_source=hashnode&utm_medium=feed)

Browser APIs are APIs that are natively built into web browsers, allowing for more robust features to be made available on the web

Jun 12, 2022 · 3 min read · oyinbayode.hashnode.dev  
Updated Jun 16, 2022  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#apis](https://hashnode.com/tag/apis)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)

## Written by

[Akinleye Oyinbayode Peters](https://hashnode.com/@Oyinbayode)

@Oyinbayode · Nigeria

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

FrontEnd Development

Hello 👋 I'm a Front-End Dev &amp;&amp; Blockchain enthusiast &amp;&amp; Technical writer

## Responses 4

Markdown supported · ⌘↵ to post

[Victor Vedenin](https://hashnode.com/@Ninedev)

[Jun 15, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a98ac80baf4306d9495709)

Hey! Thanks for the article! There are little typos in examples - you trying to access to global variables with uppercased window object. It won't work. You should use `window.localStorage` or just `localStorage`

[Akinleye Oyinbayode Peters](https://hashnode.com/@Oyinbayode)

[Jun 15, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a98ac80baf4306d9495709#reply-62a9d3541a89c91850b18155)

Thank you Victor!

That was unintended.

Yes, localStorage would work just fine in practice. I'd edit the post

[Michael Richins](https://hashnode.com/@MrGrigri)

[Jun 14, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a89d3c0baf4306d9493d60)

Thank you for this great summary. There is one thing that tripped me up whilst creating an application that was embedded inside another site within an iFrame. If a user disables Third Party Cookies, then the Web Storage API is not accessible. Even though it's not a cookie, and that the parent site cannot access the cookies inside of an iframe, it's still blocked.

[Akinleye Oyinbayode Peters](https://hashnode.com/@Oyinbayode)

[Jun 14, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a89d3c0baf4306d9493d60#reply-62a8b68e0187d006b4f70416)

Hello Michael!

I think that's an Issue with your client browser (Chrome/Firefox)

Please kindly read this for more insight into the particular issue.

[stackoverflow.com/questions/26550770/can-session-…](https://stackoverflow.com/questions/26550770/can-session-storage-local-storage-be-disabled-and-cookies-enabled)

[Miroslav Galić](https://hashnode.com/@mgalic)

[Jun 14, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a883000baf4306d94939a7)

> However, please note that sensitive, private data like JWTs should be handled with care and not stored in Web Storage because it can be accessible by anyone.

There isn't anything wrong in storing jwt/jwe in localStorage.

[Akinleye Oyinbayode Peters](https://hashnode.com/@Oyinbayode)

[Jun 14, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a883000baf4306d94939a7#reply-62a8b5be0187d006b4f703f8)

Thank you for pointing this out.

I'm just being extra careful in ensuring that private data is strictly made private.

[Shubham Kumar Singh](https://hashnode.com/@shubhamsinghbundela)

[Jun 13, 2022](https://hashnode.com/posts/the-web-storage-api/62a64b35165482d2b3eef0c4/comment/62a69320165482d2b3eef862)

Thank you [Akinleye Oyinbayode Peters](https://hashnode.com/@Oyinbayode)
