Skip to content

Instantly share code, notes, and snippets.

View hinedy's full-sized avatar
🤹‍♂️

hinedy hinedy

🤹‍♂️
View GitHub Profile
@hinedy
hinedy / cookies.md
Last active September 8, 2024 21:53

Understanding HTTP Cookies in Web Development

Introduction

In this article, we'll explore the ins and outs of HTTP cookies, their significance in web development, and how they compare to alternatives like localStorage. Whether you're new to web development or looking to refine your skills, understanding cookies is key to building robust, efficient, and secure web applications.

HTTP cookies are small pieces of data stored on a user's device by the web browser that can be used for managing user sessions, tracking user behavior, and enhancing the overall user experience.

Cookies are regular headers. On a Request, they are stored in the Cookie header. On a Response they are in the Set-Cookie header

Cookies vs localStorage