If we want to build a session mechanism that will keep unwanted users from accessing our site, how many lines of code will it take?
The Internet works by a series of requests. Your browser makes a request to a server to view a particular page. The server passes the page back to your browser and you can view it. Now you need to make another request, so you click on a hyperlink, which makes a request to the server, and so on.
The Internet is stateless, that is, each request made by your browser to another website is treated as a separate event. The HTTP protocol, which underlies the Internet, has no direct way of linking your request to any other requests made by you. It's as if you were in a restaurant—the waiter takes your order and brings you the meal, but then forgets all about you. That's fine, until he needs to bring you a bill, give you a special discount, or simply remember that you wanted him to ring for a taxi for you after you've...