Vivek Singh wrote:
>
> i have this before and didnt get satisfactory answer...
> 1. Isnt just the session id is sent to the browser when u use session
> tracking API?
Yes and no. If your application does not create any cookies, then only
the session id is sent by the server/servlet container. If your
application creates any cookies and adds those cookies to the response,
then the additional application cookies are sent as well.
> 2. When one uses cookies all the name value pairs are stored on Hard
> Disk ?
No. Cookies are only stored on the Hard Disk if they are persistent
cookies. A cookie is made persistent by setting the max age property to
some positive value. If you do not set the max age property, or you set
the max age property to zero or a negative value, the cookie will not be
saved to the permanent store by the browser. When the browser is exited,
only persistent cookies are saved. I expect that if the max age for a
cookie has passed, then that cookie is also not saved.
> If i am right then why should one need cookie after all when everything can
> be done by Session Tracking API.
Because some web applications don't want to store a lot of user
preference information on the server
Because an html form may need information from a previous page, but the
application developer didn't want the user to be able to easily see that
information if it was stored in hidden form fields
Because using cookies allows companies to track user behavior across
multiple domains (e.g. doubleclick)
Because.....
There are probably other reasons. Likewise, there are times when it
makes more sense to store data in the session object. Use the tool that
best solves the problem ("best" being defined by the goals of your
application).
K Mukhar
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html