Tutorials

Sessions and cookies: Adding state to a stateless protocol

by Daniel Egeberg on Jun 5, 2008 6:45:45 AM

Introduction

HTTP is a stateless protocol. This means that each request is handled independently of all the other requests and it means that a server or a script cannot remember if a user has been there before. However, knowing if a user has been there before is often required and therefore something known as cookies and sessions have been implemented in order to cope with that problem.

On page two we will look at cookies and sessions will be covered on page three. On page four we will talk a bit about security.

Comments

Thanks, this tutorial helped me out.

1. GreenUser on Aug 15, 2008 3:24:45 PM

Good tutorial, it helped me out as well. :)

2. BuzzardB on Oct 2, 2008 5:47:49 PM

i want to store cookie value in database and fetch that value and save it as session so whenever i delete cookies of browser i should retrive same state before deleting cookies
i am doing for portal of extjs and want this code in php

3. rohan354 on Oct 10, 2008 5:54:14 AM
Login or register to post a comment.