InterviewSolution
| 1. |
Explain cookies and sessions. |
|
Answer» COOKIES and Sessions, both, are used to store information. While cookies are only stored on the client i.e. browser, the sessions get stored on the client as well as the server. Cookies are text files that are stored on the client, for tracking purposes. When the client sends a request to the server in the future, it also sends the stored cookies to the server that can be used to identify the user. The session creates a file in a TEMPORARY DIRECTORY on the server. The data will be available to all pages on the website during that visit. When the user CLOSES the browser or leaves the site, the server will terminate that session. |
|