How do sessions work at HTTP level?

Asked

Viewed 198 times

6

I came across this question recently and didn’t find much about it in web.

I’m used to working (and reading) on Session in PHP, but I never stopped to think what they’d be like HTTP, someone would know something about?

How the session is handled and behaves at the level HTTP?

1 answer

4


As explained in the answers cited ¹ ², the HTTP is stateless:

is a communication protocol that considers each request as an independent transaction that is not related to any previous request, so that the communication consists of independent request and response pairs.

To make it possible to store states on the connection, a cookie in a specific field in the Header HTTP called HTTP_COOKIE.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.