Cookie Test Program Result

This section provides result of the cookie test program. The result shows that persistent cookies are store in a file on the Web browser local system.

Request this ASP page, special_cookies.asp, with IE, you will get:

Cookies received at this time::
Cookies.Count = 0
Adding a persistent cookie:
Cookie_1 = Value_1
Adding a persistent cookie with domain:
Cookie_d_2 = Value_d_2
Adding a persistent cookie with keys:
Cookie_p_3.Item(Cookie_c_1_3) = Value_c_1_3
Cookie_p_3.Item(Cookie_c_2_4) = Value_c_2_4

Now click at your IE "Tools" menu and select "Internet Options...". Click the "Settings..." button in the "Temporary Internet files" section of the "General" tab. You will see where is your "Temporary Internet files folder". Go to that folder, you will see a cookie file named something like "Cookie:user@localhost/". Double click on that file, you should be able to open this file in notepad:

Cookie%5Fp%5F3
Cookie%5Fc%5F2%5F4=Value%5Fc%5F2%5F4&Cookie%5Fc%5F1%5F3=Value%5Fc%...
localhost/
1024
1584531456
31520289
2345072944
29563936
*
Cookie%5F1
Value%5F1
localhost/
1024
1584531456
31520289
2345672944
29563936
*

If you click the IE refresh button, you will get the following in the IE window:

Cookies received at this time::
Cookies.Count = 2
Cookie_p_3 = Cookie%5Fc%5F1%5F3=Value%5Fc%5F1%5F3&Cookie%5Fc%5F2%5...
Cookie_p_3.Item(Cookie_c_1_3) = Value_c_1_3
Cookie_p_3.Item(Cookie_c_2_4) = Value_c_2_4
Cookie_1 = Value_1
Adding a persistent cookie:
Cookie_3 = Value_3
Adding a persistent cookie with domain:
Cookie_d_4 = Value_d_4
Adding a persistent cookie with keys:
Cookie_p_5.Item(Cookie_c_1_5) = Value_c_1_5
Cookie_p_5.Item(Cookie_c_2_6) = Value_c_2_6

To prove that the cookies are really persisted, close your IE browser. And run it again to request the same ASP page, special_cookies.asp, you will get:

Cookies received at this time::
Cookies.Count = 4
Cookie_p_3 = Cookie%5Fc%5F1%5F3=Value%5Fc%5F1%5F3&Cookie%5Fc%5F2%5...
Cookie_p_3.Item(Cookie_c_1_3) = Value_c_1_3
Cookie_p_3.Item(Cookie_c_2_4) = Value_c_2_4
Cookie_p_5 = Cookie%5Fc%5F1%5F5=Value%5Fc%5F1%5F5&Cookie%5Fc%5F2%5...
Cookie_p_5.Item(Cookie_c_1_5) = Value_c_1_5
Cookie_p_5.Item(Cookie_c_2_6) = Value_c_2_6
Cookie_1 = Value_1
Cookie_3 = Value_3
Adding a persistent cookie:
Cookie_5 = Value_5
Adding a persistent cookie with domain:
Cookie_d_6 = Value_d_6
Adding a persistent cookie with children:
Cookie_p_7.Item(Cookie_c_1_7) = Value_c_1_7
Cookie_p_7.Item(Cookie_c_2_8) = Value_c_2_8

From this tutorial, we have learned:

Last update: 2002.

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

 What Is a Cookie?

 Sending and Receiving Cookies

 Cookie Properties and Itemized Values

Cookie Test Program Result

 Special 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