Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's wrong with my cookies?

Status
Not open for further replies.

Vintious

Programmer
Dec 16, 2002
3
0
0
US
I have a site which uses cookies. Here is a portion of my code:

Response.Cookies("mySite") ("id") = 10
Response.Cookies("mySite") ("username") = "someone"
Response.Cookies("mySite").Expires = DateAdd("y",1,Date)

However, when I close my browser and open it again the cookie doesn't exist!

I have also tried adding this line:
Response.Cookies("mySite").Domain = ".mysite.com"

When I do that, I have to close the browser and open it again before it recognises the cookie!

Am I missing something? Should I set the expiration date with a client-side script? If so, which language?

Thanks
 
have you set the expire date??
Response.Cookies ("mySite").Expires = DATE + 365 _________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
 
I meant try that. I know you set it there _________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top