2021-09-07
2520
#vanilla javascript
Prateek Surana
65366
Sep 7, 2021 â‹… 9 min read

A JavaScript developer’s guide to browser cookies

Prateek Surana I'm a frontend engineer currently building Devfolio who likes to build awesome products and write about React, JavaScript, and TypeScript.

Recent posts:

Gemini CLI vs Codex CLI: A Comparative Analysis

Does Gemini CLI fall short? Here’s how Codex compares

Compare Codex CLI vs Gemini CLI for real-world coding tasks. See strengths, weaknesses, and which AI CLI fits your developer workflow best.

Emmanuel John
Aug 20, 2025 â‹… 8 min read
Is Next.js Still Developer-Friendly?

Is Next.js still developer-friendly?

The question isn’t whether Next.js is good or bad; it’s whether the productivity gains are worth the complexity tax.

Chizaram Ken
Aug 20, 2025 â‹… 5 min read
Don’t Let AI Erase The Next Generation Of Dev Leaders

Don’t let AI erase the next generation of dev leaders

As AI tools take over more routine coding work, some companies are cutting early-career dev roles — a short-sighted move that could quietly erode the next generation of tech leaders if we aren’t careful.

Jack Herrington
Aug 19, 2025 â‹… 6 min read
Nuxt 4.0 Is Here: What’s New And What To Expect

Nuxt 4.0 is here: What’s new and what to expect

Learn what’s new in Nuxt 4, from the app/ directory to TypeScript improvements and data fetching changes. Plus, tips for a smooth migration.

Ikeh Akinyemi
Aug 19, 2025 â‹… 4 min read
View all posts

4 Replies to "A JavaScript developer’s guide to browser cookies"

  1. Probably one of the best articles I have read! (in a long while)

    Good job and great explanation of how cookies defer from Local- & session storage. Learned a lot of new concepts here including security vulnerabilities regarding cookies and how to properly use cookie attributes.

  2. Thank you for this comprehensive article. Would you know if browsers, iOS Safari in particular, would start treating a cookie set in js as an http cookie if the server updates that cookie in a future request? For instance by changing the expiry date.

Leave a Reply