Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

client state

I read as follows

online library catalog do not need to maintain client state. So stateless HTTP may work good for this type of simple web browsing.

I have not understood why online library catalog does not need to maintain client state.
 Please advise
Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
Avatar of girionis
girionis
Flag of Greece image

Because when you browse an online library the server does not have to remember anything the user is doing with the previous requests. It's pointless to keep the state since you are just looking at the books.
But then state would come into picture when you are actually want to book something
If you want a book you do one request and you get the book. No need for state. You would need state if you wanted to browse for several books and keep track of the books you are browsing.
Avatar of gudii9

ASKER

>>>If you want a book you do one request and you get the book. No need for state.

i was not clear.why state not needed in case of getting a single book. Please advise
In the example above (online library) you wouldn't need to keep state for *any* number of books, because you just browse for the books. The flow is like the following

1) you search for book a
2) you browse the book a
3) you search for book b
4) you browse the book b
and so on.

When, at the time you browse book b, you also need to remember that you also browsed book a, then you need state. Otherwise, if you do not need to remember which books you searched for, you do not need state.
Avatar of gudii9

ASKER

What is the difference between Seaching and Browsing.

Let us say I search for book called "Java for beginners". I found book. then I click that book link to read. Is that process of clikcing that book link to read online is browsing? Please advise
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial