Cookies Don't Persist

'Using Cookies' tutorial was cited in an ASP Free Forums article in 2004.

The Using Cookies tutorial was cited a in ASP Free Forums article in 2004.

Subject: Cookies don't persist
Date: Aug 18, 2004
Source: http://forums.aspfree.com/showthread.php?p=97445#post97445
Author: drewser

I can only get one cookie (which does not persist) from the following 
asp script:

<script language="vbscript" runat="server">
' cookie_test.asp
' Copyright (c) 2002 by Dr. Herong Yang
' This ASP page displays all the cookies received by the server.
'
response.write("<html><body>")
' Displaying all the cookies 
response.write("<b>Cookies received at this time:</b>:<br/>")
set c = request.Cookies
response.write("Cookies.Count = " & c.Count & "<br/>")
for each n in c
response.write( n & " = " & c(n) & "<br/>")
next
response.write("<b>Cookie added by the server:</b><br/>")
n = "Cookie_" & (c.Count+1)
v = "Value_" & (c.Count+1)
response.write( n & " = " & v & "<br/>")
response.cookies(n) = v
response.write("</body></html>")
</script>

Which results in:
Cookies received at this time::
Cookies.Count = 0
Cookie added by the server:
Cookie_1 = Value_1


Changing the Session. Timeout value has no effect. Any ideas???

Andrew
   
-------------------------------------------------------------- 
It works for me. If you refresh the page it adds a new cookie 
each time. What are you expecting it to do?

Check your cookie handling (in IE, tools/options/privacy/advanced). 
You may have it blocking persistant cookies. 

kbogart

Table of Contents

 About This Book

 Reference Citations in 2017

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

 Reference Citations in 2013

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

Reference Citations in 2004

 HelloWeb Quick Start Guide

 Float vs Double

 J2SE Unicode 转化为 GB2312

Cookies Don't Persist

 tomcat problem

 Jakarta Taglibs, JSTL Problem

 Dovecot SSL Warning (Not Error)

 Cipher, byte[]s and Strings; oh my!

 BodyTagSupport and JSP body-content

 Codifica Base64

 Java: Catching Stack Overflow

 Invoking Remote Webservices from a Perl Client

 IP Protection and Encryption Donation

 Validate XML Documents in Java

 Java - Boolean

 GB2312 and Unicode Mapping Table

 CST 365/465 - Web Programming I

 Reference Citations in 2003

 PDF Printing Version