blah blah blah is here! blah blah » Close

up1down
link

How or why is the internet (web applications) considered to be in a stateless environment?

What does it mean to be stateless?

last answered 2 years ago

1 answers

up1down
link

the internet utilizes HTTP which stands for hypertext transfer protocol. it was developed as a way to transfer text based documents (HTML a subset of SGML) over a TCP connection.

by it's definition http does not provide any facility for maintaining contextual information between document requests, and is therefore "stateless." any state info must be maintained independently of the underlying transfer protocol (through custom HTTP headers which both the client and server applications understand).

because at its heart it's a document transfer protocol (unlike FTP which establishes and maintains a "session" for the duration of the process) and follows a very short: Request -> Response format.

later on clients and server began to apply information about state to the application layer by adding a psudo session management through storing session information on the server and sending information to be stored at the client (cookies) which could be used to map client session identifiers to server session info.

update

Cookies are bits of info that are sent in response to a client request that are stored on a by domain basis, which the client forwards to a particular server. They are more of a server convention than a client (though browsers can manipulate cookie data). it's typically a server serialized data set, and that is server dependent. Implementation wise they are name-value pairs used by a server to either maintain state, session, or general data about the client and or server relationship. The term "cookie" came from the term "magic cookie" which was a token bit of information passed between processes in Unix, where the data passed was meaningless to one of the applications.

MadHatter, does the nature of cookies vary from browser to browser? I mean, do the cookies stored in netscape differ in internet explorer?

sanjib
226

Many thanks Madhatter, for your explanation. Thanks to bengaliana for raising a good point.

Feedback