|
-
Aug 3rd, 2005, 11:24 AM
#1
Thread Starter
Hyperactive Member
Vanishing cookies
Guys
I have a cookie problem. I set a cookie:
VB Code:
response.cookies("agentcode") = section
Response.Cookies("agentcode").Expires= Date + 30
and if I retrieve it straight away then it's there:
VB Code:
response.write request.cookies("agentcode")
response.end
However I then use response.redirect to send it to another page then I try to retrieve the cookie at the very top of that page and it's empty.
I've tried this on a few machines and different browsers.
Any ideas?!
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Aug 5th, 2005, 03:03 AM
#2
Thread Starter
Hyperactive Member
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Aug 5th, 2005, 12:10 PM
#3
Hyperactive Member
Re: Vanishing cookies
I am not big on cookies but as I understand it a redirect wont send the cookie to another page, I think you have to request that cookie again... I know there is away to keep the cookie alive I am not sure that redirect is it?
-
Aug 6th, 2005, 02:23 AM
#4
Addicted Member
Re: Vanishing cookies
TroyMac : Actually when you write Cookies using response object then it will be written in the client's computer. after that any asp page of that domain should be able to read it unless they are expired. i don't know why his does not work but, i tried the same code which thebloke wrote. it works fine in my system.
thebloke : properties like path, or secure may restrict the cookies to be read by pages of certain directories or https protocol respectively(i just refered a book now). but i don't think they will be set off in any iis by default. so hope no need to wander thru them.
have you tried cookies with some other pages. try with some other virtual directory to check cookies are working. hope all your browsers are set to accept cookies.
Last edited by kishore.kr; Aug 6th, 2005 at 02:31 AM.
--Kishore...
-
Aug 6th, 2005, 05:30 PM
#5
Fanatic Member
Re: Vanishing cookies
Hi
If your looking for some thing to transer informational variables to otyher pages, or just to transfer information (such as a shopping car to a HTTPS server, then back again) you could use querystrings...
Cookies a page specific not ip specific, and if you have an aol user, you knackered!!!!
sue query strings, much easier on the code, user and browswer.
ta
kai
-
Aug 7th, 2005, 11:36 PM
#6
Addicted Member
Re: Vanishing cookies
kaihirst :
Cookies a page specific not ip specific, and if you have an aol user, you knackered!!!!
are you sure cookies are page specific.
cookies does have disadvantages., like when users browser does not accept cookies. if you have noted thebloke's code then he wants to store a information in clients computer for 30 days. so it can't be performed with querystring. so cookies are one of the prefered choice there.
and i think cookies are not page specific.
--Kishore...
-
Aug 8th, 2005, 03:32 AM
#7
Thread Starter
Hyperactive Member
Re: Vanishing cookies
 Originally Posted by kishore.kr
kaihirst :
and i think cookies are not page specific.
No, they're not.
I think the problem may be firewall related....I'm still checking...
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|