Page

8.0.0- Applications, Sessions and Cookies

Created by Brendan Doss.
Last Updated by Brendan Doss.  

PublicCategorized as 08. Applications, Sessions and Cookies.

Not yet tagged

Chapter88.1.0- Web Applications >>


Applications, Sessions and Cookies

In our travels through the world of Active Server Pages, we have been dealing with how information can be sent from the client to the server, and how the server can dynamically create a page that is returned to the client. In all of these interactions, the request and the response existed by themselves. There has been no mechanism introduced that allows you to tie two pages, or a set of pages, together.

 

Until recently, existing web technologies meant that if you wanted to pass information from one page to another, you were restricting yourself to using cookies in JavaScript, hidden form fields or querystring parameters. Active Server Pages has extra tools to help pass information between pages: the Application and Session objects. It also provides collections and methods that make cookies far easier to use.

 

In this chapter, we will look at these objects and the power and flexibility they add to ASP. We'll also look at how cookies have survived the onslaught of time and are still as valid as they ever were. You will hopefully be able to see the concept of web applications in practice, and how these objects transform our sites into true applications rather than just a bundle of loosely linked web pages. Specifically, we will be examining:

 

  • Why you can't use HTTP to track an individual user on your web site from start to finish
  • How to use cookies to store information at the client's computer and what cookies should be used for.
  • The Application object, which allows us to tie together all of the pages of a single web site into a consistent web application.
  • The Session object, which allows us to treat a user's interaction with the web site within a specified period of time, as a set of saved variables, rather than just a disconnected series of page requests.

 

Let's start by taking a look at what you might expect from a web application.


Chapter88.1.0- Web Applications >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |