![]() ![]() Sessions, on the other hand, store historical information on the server side. The client's browser sends these cookies everytime the user visits the same website, automatically completing the login step for the user. An alternative way of achieving this goal is to save the user's identity either on the server side or client side using cookies and sessions.Ĭookies, in short, store historical information (including user login information) on the client's computer. This works, but puts too much pressure on the server (the server must validate every request against the database), and can be detrimental to the user experience. The easiest and perhaps the most naive solution is to append the username and password to the URL. The question here is, how does the server know that we have access privileges for the desired webpage? Because HTTP is stateless, the server has no way of knowing whether or not we passed the verification in last step. The Browser redirects to the user homepage after the server verifies the login information and returns an HTTP response. When we first receive a login page and type in a username and password, after we press the "login" button, the browser sends a POST request to the remote server. Therefore, we have to find out what is really going on behind the scenes when we use a browser to login. Of course you can open your browser and type in your username and password to login and access that information, but so-called "web crawling" means that we use a program to automate this process without any human intervention. Suppose you want to crawl a page that restricts public access, like a twitter user's homepage for instance. Let's take a look at these two use cases. ![]() However, they are extremely important for the authorization of pages, as well as for gathering page statistics. Sessions and cookies are two very common web concepts, and are also very easy to misunderstand. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |