Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Detect Cookies


Message #1 by "siew kim" <siew_kim@h...> on Wed, 8 May 2002 03:41:55
> i used cookies in my programming but i am a newbie at it. i copied the 
f> ollowing line into my computer to detect if cookies are enabled. 
however 
e> ven went i have enabled the cookies in my computer, the page is still 
r> edirected to "BrowserError.htm". Please Help!!!!!!!
<> %@ Language=VBScript %>
 >    <%
 >    If Len(Request.Cookies("SITESERVER")("ID")) = 0 Then 
Response.Redirect 
B> rowserError.htm"
 >   %>

You have to put an expire date because if not the cookie expire at the 
same time

example

	Response.Cookies(name)=news
	Response.Cookies(name).expires=now()+730
	Response.Cookies(name).path="/"
	

  Return to Index