Page

7.1.7- The Response Object

Created by Brendan Doss.
Last Updated by Joel Bush.  

PublicCategorized as 07. The Request and Response Objects.

Not yet tagged
<< 7.1.6- Properties and Methods of the Request ObjectChapter77.1.8- Controlling How Information is Returned >>

The Response Object

As we have briefly mentioned earlier in the book, the Response object is used to send the server's output to the client. In this sense, the Response object is the counterpart to the Request object: the Request object gathers information mainly from the client (but also from the server), and the Response object sends, or resends, the information to the client by writing to the outgoing page. Whereas the Request object is rich in information and scarce in properties and methods, the Response object has only one collection but gives us many properties and methods with which to build pages.

 

With the Response object, the ASP script can:

 

  • Send information back to the client
  • Control when to send information back to the client
  • Tell the browser how long – or until when – to cache the contents of the page
  • Tell the browser to go fetch another page
  • Perform other functions with the information that's being sent back to the browser
  • Instruct browser to create a cookie (which we'll consider in the next chapter)

 

These features allow you to use ASP scripts to flexibly control how information is presented to the client. We've already dealt with how you can send information back to the client using Response.Write (or its shortcut); otherwise sending information to the server would have been a seemingly pointless process, as you wouldn't have been able to get any information back. What you might not know is that you can specify when you wish to send that information back.

<< 7.1.6- Properties and Methods of the Request ObjectChapter77.1.8- Controlling How Information is Returned >>

Copyright © 2003 by Wiley Publishing, Inc.

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