answersLogoWhite

0

Why is a session stateless?

Updated: 5/1/2024
User Avatar

Wiki User

βˆ™ 13y ago

Best Answer

Session is stateless or statefull based on work to be done. This answers "why?".

In case of a web server each each request we make to the web server is stateless mean independent of another request. Therefore we use $_SESSION and $_COOKIES to keep state of a server script variable across requests.

A work can be performed within a single method invocation(request to the web server), or it may span multiple method invocations(example: statefull bean in java)

If you will read this link http://www.java-samples.com/showtutorial.php?tutorialid=841 and will work on java bean, the statefull nature of a bean will be clear. In this user object(a java bean) has to keep it's state across multiple methods invocation by the client.

Nonetheless all causes related to work we do on day to day basis may be difficult to find out and to interpret even if we find out them.

User Avatar

Wiki User

βˆ™ 13y ago
This answer is:
User Avatar
More answers
User Avatar

AnswerBot

βˆ™ 1d ago

A session is considered stateless because each request from a client is treated as an independent transaction by the server. This means that the server does not retain any information about previous requests from the same client, and each request is handled without any knowledge of past interactions. However, session management techniques can be used to maintain a sense of continuity and statefulness for the user during their session.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is a session stateless?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a stateless session beans?

A stateless session bean is a type of enterprise bean in Java EE that doesn't maintain any conversational state with clients. Each client request is treated independently, and the server can choose any available instance of the stateless session bean to handle the request. Statelessness allows for efficient use of resources and parallel processing since the server doesn't have to keep track of the state of each client.


What annotation do you use to declare a business interface as a local interface in a stateless session bean?

@Local


When was Stateless - Stateless album - created?

Stateless - Stateless album - was created on 2007-07-16.


What is HTML stateless protocol?

HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. This is the main reason that it is difficult to implement Web sites that react intelligently to user input. This shortcoming of HTTP is being addressed in a number of new technologies, including ActiveX, Java, JavaScript and cookies.


What does stateless religion mean in Judaism?

the term "stateless religion" is not a concept in Judaism.


A society that strives to be classless and stateless is called?

A classless stateless society is Socialism.


What is session software?

In computer science and networking in particular, a session is a temporary and interactive information interchange between two or more communicating devices, or between a computer and user (see login session). A session is established at a certain point in time, and then β€˜torn down’ - brought to an end - at some later point. An established communication session may involve more than one message in each direction. A session is typically stateful, meaning that at least one of the communicating parties needs to hold current state information and save information about the session history to be able to communicate, as opposed to stateless communication, where the communication consists of independent requests with responses.


HTTP is classified as a protocol?

HTTP is classified as a stateless protocol. HTTP is classified as a stateless protocol.


What are the ratings and certificates for The Stateless Man - 1955?

The Stateless Man - 1955 is rated/received certificates of: UK:U


What actors and actresses appeared in Stateless - 2013?

The cast of Stateless - 2013 includes: Hetty MacDowell as Narrator


The stateless nation of Kurdistan includes the southeastern portion of?

The stateless nation of Kurdistan includes the southeastern portion of Turkey.


What is the use of Session in aspnet?

Using Sessions we can maintain user specific data on the server. Since HTTP is a stateless protocol so Session can be used to carry values specific to a particular user from one webpage to another. Lets say person1 and person2 and are accessing a website. Person1 adds one item to his cart and person2 adds three items to his cart. When Person1 moves to the next page to process the payment, Person1 should see only the items selected by him. One way of doing this is by using a Session object and storing the items in the Session object.