C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




14)what is the difference between session and cookie?


Posted Date: 12 Mar 2007      Total Responses: 5

Posted By: Swapna        Member Level: Gold     Points: 2


14)what is the difference between session and cookie?



Responses

Author: suryanalini    12 Mar 2007Member Level: BronzeRating:     Points: 2
Cookie is client side example yahoo-messanger in yahoo messanger your login id is stored browser taskbar

session is stored in server side like yahoosite


Author: Mohan Kumar    24 Jan 2008Member Level: DiamondRating:     Points: 2
hi,

check this link.
msdn2.microsoft.com/en-us/library/aa289495(VS.71).aspx


Author: UltimateRengan    24 Aug 2008Member Level: DiamondRating:     Points: 6
hi,
Session is used to store the some information to it.you can reuse it another page or site with in project.

for ex:-

session("UserName")="Rengan"
textbox1.text=Session("UserName")

Method Description

Abandon :Destroys a user session
Contents: Remove Deletes an item from the Contents collection Contents.
RemoveAll() Deletes all items from the Contents collection

Events :-

Session_OnEnd :-

Occurs when a session ends
Session_OnStart:-

Occurs when a session starts


Cookies are the small file saved in the client machine which could be used for saving informations like user preferences and other details
Users could save or delete cookies at any time as per their requirement.



Author: Sridhar R    25 Aug 2008Member Level: DiamondRating:     Points: 6
Difference..
Session..
1.A session is a store of data on the server containing state information on a user.
2.Sessions are identified by session ID.
3.Sessions are application specific and persist only as long as you are actively engaged with a particular web site.
4.If u went a online site and do shopping and close the site before u purchase something means ur session has ended.

Cookie..
1.Cookies persist on local computer.These are small text files.
2.The text files contains some basic information about you as a user.
3.A cookie is also a store. To create a cookie, the server sends a HTTP header to the client.
4.If the client supports and accepts the cookie, the cookie will be sent back to the server along with every request made to the server.



Author: Meetu Choudhary    17 Oct 2008Member Level: GoldRating:     Points: 6
Difference between Session and Cookies
1. The main difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not.
2. But Sessions are popularly used, as the there is a chance of your cookies getting blocked if the user browser security setting is set high.
3. The Key difference would be cookies are stored in your hard disk whereas sessions aren’t stored in your hard disk. Sessions are basically like tokens, which are generated at authentication. A session is available as long as the browser is opened.
4. A session as is a server-side object which stores State. A cookie is a small piece of information a browser sends to a server with every request.
5. Session should work regardless of the settings on the client browser. even if users decide to forbid the cookie (through browser settings) session still works. there is no way to disable sessions from the client browse
6. Session and cookies differ in type and amount of information they are capable of storing.
==
Thanks and Regards
Meetu Choudhary




Post Reply
You must Sign In to post a response.
Next : 12)with out web.configfile can I run application? Minimum how many web.config files I can put ? what
Previous : 15)while executing an application can we change values at run time? How it is?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it help desk

Contact Us    Privacy Policy    Terms Of Use