---
title: "Discussion on \"localStorage  vs. HttpOnly Cookies Explained ( JWTs ) .\" | Hashnode"
description: "Discussion on \"localStorage  vs. HttpOnly Cookies Explained ( JWTs ) .\". the security trade-offs between storing JWTs in localStorage vs. HttpOnly cookies, and implement the Dual-Token architecture to stop XSS and CSRF."
url: "https://hashnode.com/posts/localstorage-vs-httponly-cookies-explained-jwts/6b02f7e487efbb9b75014636"
---

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

Discussion

# [localStorage vs. HttpOnly Cookies Explained ( JWTs ) .](https://kamalaboueid.hashnode.dev/localstorage-vs-httponly-cookies-explained-jwts?utm_source=hashnode&utm_medium=feed)

the security trade-offs between storing JWTs in localStorage vs. HttpOnly cookies, and implement the Dual-Token architecture to stop XSS and CSRF.

2d ago · 6 min read · kamalaboueid.hashnode.dev  
Read the article

-   [#jwt](https://hashnode.com/tag/jwt)
-   [#json-web-tokens-jwt](https://hashnode.com/tag/json-web-tokens-jwt)
-   [#httponly](https://hashnode.com/tag/httponly)
-   [#cookies](https://hashnode.com/tag/cookies)
-   [#localstorage](https://hashnode.com/tag/localstorage)

## Written by

[kamal aboueid](https://hashnode.com/@kamalaboueidd)

@kamalaboueidd · Alexandria, Egypt

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

Software Engineer | Frontend Architecture & System Design & Problem solver

Software Engineer blending deep algorithmic problem solving with scalable Frontend Architecture. Obsessed with high-performance web systems, Core Web Vitals, accessibility, and modern UI engineering.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
