Cookie Issue

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/71071?pagenum=1
05 November 2025, 17:13

Topic


Carefree
Cookie Issue
13 October 2015, 17:53


Code:

strIMDBs="Display"
If Request("strIMDBs") > "" Then
strIMDBs=Trim(Request("strIMDBs"))
IMDBI=Application(strCookieURL & "IMDBI")
Response.Cookies(strUniqueID)("IMDBI") = strIMDBs
Response.Cookies(strUniqueID & "IMDBI").Expires = Date + 30
ElseIf Request.Cookies(strUniqueID)("IMDBI") > "" Then
strIMDBs=Request.Cookies(strUniqueID & "IMDBI")
End If

For whatever reason, it dies, but the same server writes cookies just fine on another page. Error captured this, it seems that it thinks the cookie is a header?
006~ASP 0156~Header Error~The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.

 

Replies ...


Carefree
13 October 2015, 19:31


Solved it. I just moved the entire routine above everything else.
© 2000-2021 Snitz™ Communications