Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Issue with Cookies not getting deleted even after setting a previous date in expires property (http://www.velocityreviews.com/forums/t790262-issue-with-cookies-not-getting-deleted-even-after-setting-a-previous-date-in-expires-property.html)

techie 09-16-2003 09:54 PM

Issue with Cookies not getting deleted even after setting a previous date in expires property
 
I am using the following to delete the contents of a cookie

Response.Cookies("maincookie").expires = DateAdd("d",-2,now)
Response.redirect "login.asp"

If i try to alert the value of the cookie in the same page, it shows
the old value. As well as when it is alerted from the login.asp it
shows the old value.
The problem is when i try to update the value of the cookie in the
login page, it does not update the new value.
Only if i close the browser and reopen, the new value gets updated and
even if the old value is originally present in the cookie.
I am specifying the domain and path when creating the cookie. the
expires property is set to date + 1 when creating.

What should be done to delete the contents of the cookie? Should i
specify the domain as well as path when changing the expires property?
Thanks in advance

Curt_C [MVP] 09-16-2003 10:43 PM

Re: Issue with Cookies not getting deleted even after setting a previous date in expires property
 
I suspect the page/site info is being cached. Try putting the "no cache"
code into your page(s).

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------


"techie" <ashwini_ghag@yahoo.com> wrote in message
news:d75dcad6.0309161354.234a0cd4@posting.google.c om...
> I am using the following to delete the contents of a cookie
>
> Response.Cookies("maincookie").expires = DateAdd("d",-2,now)
> Response.redirect "login.asp"
>
> If i try to alert the value of the cookie in the same page, it shows
> the old value. As well as when it is alerted from the login.asp it
> shows the old value.
> The problem is when i try to update the value of the cookie in the
> login page, it does not update the new value.
> Only if i close the browser and reopen, the new value gets updated and
> even if the old value is originally present in the cookie.
> I am specifying the domain and path when creating the cookie. the
> expires property is set to date + 1 when creating.
>
> What should be done to delete the contents of the cookie? Should i
> specify the domain as well as path when changing the expires property?
> Thanks in advance




techie 09-17-2003 09:16 PM

Re: Issue with Cookies not getting deleted even after setting a previous date in expires property
 
Thanks for your response.
I have the "no cache" code already in the files.
The main problem is that as soon as i update the value of the cookie
and alert it.. its shows updated value.. but in the following pages it
still uses the old value unless i close the browser and re-open.



"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:<esAoNPKfDHA.3248@tk2msftngp13.phx.gbl>...
> I suspect the page/site info is being cached. Try putting the "no cache"
> code into your page(s).
>
> --
> ----------------------------------------------------------
> Curt Christianson (Software_AT_Darkfalz.Com)
> Owner/Lead Designer, DF-Software
> http://www.Darkfalz.com
> ---------------------------------------------------------
> ..Offering free scripts & code snippits for everyone...
> ---------------------------------------------------------
>
>
> "techie" <ashwini_ghag@yahoo.com> wrote in message
> news:d75dcad6.0309161354.234a0cd4@posting.google.c om...
> > I am using the following to delete the contents of a cookie
> >
> > Response.Cookies("maincookie").expires = DateAdd("d",-2,now)
> > Response.redirect "login.asp"
> >
> > If i try to alert the value of the cookie in the same page, it shows
> > the old value. As well as when it is alerted from the login.asp it
> > shows the old value.
> > The problem is when i try to update the value of the cookie in the
> > login page, it does not update the new value.
> > Only if i close the browser and reopen, the new value gets updated and
> > even if the old value is originally present in the cookie.
> > I am specifying the domain and path when creating the cookie. the
> > expires property is set to date + 1 when creating.
> >
> > What should be done to delete the contents of the cookie? Should i
> > specify the domain as well as path when changing the expires property?
> > Thanks in advance


Curt_C [MVP] 09-17-2003 09:56 PM

Re: Issue with Cookies not getting deleted even after setting a previous date in expires property
 
where is the cookie "read" in? on the other page or ?

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------


"techie" <ashwini_ghag@yahoo.com> wrote in message
news:d75dcad6.0309171316.378323d0@posting.google.c om...
> Thanks for your response.
> I have the "no cache" code already in the files.
> The main problem is that as soon as i update the value of the cookie
> and alert it.. its shows updated value.. but in the following pages it
> still uses the old value unless i close the browser and re-open.
>
>
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message

news:<esAoNPKfDHA.3248@tk2msftngp13.phx.gbl>...
> > I suspect the page/site info is being cached. Try putting the "no cache"
> > code into your page(s).
> >
> > --
> > ----------------------------------------------------------
> > Curt Christianson (Software_AT_Darkfalz.Com)
> > Owner/Lead Designer, DF-Software
> > http://www.Darkfalz.com
> > ---------------------------------------------------------
> > ..Offering free scripts & code snippits for everyone...
> > ---------------------------------------------------------
> >
> >
> > "techie" <ashwini_ghag@yahoo.com> wrote in message
> > news:d75dcad6.0309161354.234a0cd4@posting.google.c om...
> > > I am using the following to delete the contents of a cookie
> > >
> > > Response.Cookies("maincookie").expires = DateAdd("d",-2,now)
> > > Response.redirect "login.asp"
> > >
> > > If i try to alert the value of the cookie in the same page, it shows
> > > the old value. As well as when it is alerted from the login.asp it
> > > shows the old value.
> > > The problem is when i try to update the value of the cookie in the
> > > login page, it does not update the new value.
> > > Only if i close the browser and reopen, the new value gets updated and
> > > even if the old value is originally present in the cookie.
> > > I am specifying the domain and path when creating the cookie. the
> > > expires property is set to date + 1 when creating.
> > >
> > > What should be done to delete the contents of the cookie? Should i
> > > specify the domain as well as path when changing the expires property?
> > > Thanks in advance





All times are GMT. The time now is 03:52 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.