ASP Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.00

Creating and Managing Cookies

This chapter provides tutorial notes and example codes on cookies. Topics include introduction of cookies; using response.Cookies collection object to create and manage cookies; sending to the Web browser and receiving cookies from the Web browser.

What Is a Cookie?

Sending and Receiving Cookies

Cookie Properties and Itemized Values

Cookie Test Program Result

Special Cookies

Conclusions:

  • Cookie is a small amount of information sent by a Web server to a Web browser, saved by the browser, and sent back to the server later.
  • response.Cookies collection object can be used to create cookies and send them to the browser.
  • request.Cookies collection object can be used to receive cookies from the browser.
  • Temporary cookies are stored the browser's memory only so they are valid only with a single browser session.
  • Persistent cookies are stored in a file on the browser's local system, so they are valid much longer, until their specified expiration date and time.

Table of Contents

 About This Book

 ASP (Active Server Pages) Introduction

 IIS (Internet Information Services) 5.0

 MS Script Debugger

 VBScript Language

 ASP Built-in Run-time Objects

 ASP Session

Creating and Managing Cookies

 Managing Sessions with and without Cookies

 scrrun.dll - Scripting Runtime DLL

 Managing Response Header Lines

 Calculation Speed and Response Time

 ADO (ActiveX Data Object) DLL

 Working with MS Access Database

 Guest Book Application Example

 References

 PDF Printing Version

Dr. Herong Yang, updated in 2010
Creating and Managing Cookies