HTTP: stateless protocol

HTTP is a stateless protocol

HTTP is a stateless protocol(which means each and every connection is independant of each other.)

Without using a DB, there are a few options we could use:
Use POST/GET variables to pass info from page to page.
Use the session to store information.
Use cookies to store information.
Using POST/GET is usually best if you just have one page "talking" to one other page (e.g. submission of a form). If you have a bunch of data that will be shared by several pages, the best way to do it would probably be to put them in the session. If you need those values to stick around after the user leaves your site and comes back later, then you might want to use cookies.

HTTP is stateless – this means that when using HTTP the end point does not "remember" things (such as who you are). It has no state. This is in contrast to a desktop application – if you have a form and you go to a different form, then go back, the state has been retained (so long as you haven't shut down the application).

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>