This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I have confusion in understanding URL re-writing.Please check it is correct or not?
Http protocol is stateless protocol.Server not able identify the clients.So cookies are use as meduim by the server to share session id from client to server.
The main goal is to establish session between client and server.
suppose client is not accepting cookies.assume that user is sending first request by clicking on the link "click me" to server.
Q1) what are the steps the container will do?
1) Container will create unique session id for a client and suff session id in cookie and will send back to the client.
2) Now client is not accepting cookies: Now how container will come to know that client is not accepting cookies?
3) At time server send his first response to the client it tries both cookie as well as url re-writing(Assume url encoded)
4) At client side[browser] is not able add session to the cookie that client received. Session id is appended at the end of URL (Because of reponse.encodeURL).
5) Now herafter server starts using url -rewriting.
Q2)Please let me know if there are any steps missing in between?
Step 3 is crucial - the server tries both cookies and URL rewriting. By the time the second client request comes in, there are two possibilities:
a) it contains a cookie - the server can henceforth use the cookie, and doesn't need to perform URL rewriting
b) it does not contain a cookie - the server must continue to use URL rewriting, since cookies are not used by the client