---
title: "What is the difference between cookies and session?"  
description: "What is the difference between cookies and session?"  
author: "Anurag Sharma"  
published: 2010-10-11  
updated: 2010-10-11  
canonical: https://www.mindstick.com/forum/34/what-is-the-difference-between-cookies-and-session  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# What is the difference between cookies and session?

What is the [difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between [cookies](https://www.mindstick.com/articles/12044/cookies-in-c-sharp) and [session](https://www.mindstick.com/articles/12042/session-in-c-sharp)?please provide me any [sample](https://www.mindstick.com/news/2174/mars-mission-by-nasa-prepares-for-tests) of [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) and concept. \
Thanks, Anurag

## Replies

### Reply by Anonymous User

Hi Anurag,\
\
The main difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not.\
\
A session is available as long as the browser is opened while A cookie can keep information in the user's browser until deleted.\
\
User can block cookies or delete them at any time while Sessions are not reliant on the user allowing a cookie. They work instead like a token allowing access and passing information while the user has their browser open.\
\
For creating cookies you can read this link.\
http://www.mindstick.com/Articles/c4e253f5-67dc-4211-8a1f-e29c17ce2943/\
\
For details about creating and using Session visit this link.\
http://www.mindstick.com/Articles/273b0c21-a027-46ec-8c84-ad4e05c62b23/\
\


---

Original Source: https://www.mindstick.com/forum/34/what-is-the-difference-between-cookies-and-session

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
