I am using the following to delete the contents of a cookie
Response.Cookie s("maincookie") .expires = DateAdd("d",-2,now)
Response.redire ct "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 3 2327
I suspect the page/site info is being cached. Try putting the "no cache"
code into your page(s).
--
----------------------------------------------------------
Curt Christianson (Software_AT_Da rkfalz.Com)
Owner/Lead Designer, DF-Software http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"techie" <as**********@y ahoo.com> wrote in message
news:d7******** *************** ***@posting.goo gle.com... I am using the following to delete the contents of a cookie
Response.Cookie s("maincookie") .expires = DateAdd("d",-2,now) Response.redire ct "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
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_da rkfalz.com> wrote in message news:<es******* *******@tk2msft ngp13.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_Da rkfalz.Com) Owner/Lead Designer, DF-Software http://www.Darkfalz.com --------------------------------------------------------- ..Offering free scripts & code snippits for everyone... ---------------------------------------------------------
"techie" <as**********@y ahoo.com> wrote in message news:d7******** *************** ***@posting.goo gle.com... I am using the following to delete the contents of a cookie
Response.Cookie s("maincookie") .expires = DateAdd("d",-2,now) Response.redire ct "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
where is the cookie "read" in? on the other page or ?
--
----------------------------------------------------------
Curt Christianson (Software_AT_Da rkfalz.Com)
Owner/Lead Designer, DF-Software http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"techie" <as**********@y ahoo.com> wrote in message
news:d7******** *************** ***@posting.goo gle.com... 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_da rkfalz.com> wrote in message
news:<es******* *******@tk2msft ngp13.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_Da rkfalz.Com) Owner/Lead Designer, DF-Software http://www.Darkfalz.com --------------------------------------------------------- ..Offering free scripts & code snippits for everyone... ---------------------------------------------------------
"techie" <as**********@y ahoo.com> wrote in message news:d7******** *************** ***@posting.goo gle.com... I am using the following to delete the contents of a cookie
Response.Cookie s("maincookie") .expires = DateAdd("d",-2,now) Response.redire ct "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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brian Burgess |
last post by:
Hi all,
Anyone know of any special issues with storing cookies with ASP? I'm
trying this with two browsers: One is IE 6.0 with cookies set to
'prompt'. This has been working properly as any new site I goto seems
to prompt me to store their cookie. The other is Pocket IE on Pocket
PC 2002, with the cookies set to 'enabled'.
My problem is that the cookies dont seem to be being written with my
ASP. I dont get the prompt to store...
|
by: Brian Burgess |
last post by:
Hi all,
Anyone know if this is possible? If so, on which page would the
cookie be? .. On the page calling a function defined in the include
file?
thanks in advance..
-BB
|
by: Fabrice Labrousse |
last post by:
Hello,
after many deep searches on javascript and cookies, i still cannot have an
answer for a incredible cookie problem !
here it is, i hope you'll be able to answer me :
This is my function that put on a disk a cookie that has a 5 minutes
duration
|
by: Mark |
last post by:
Hi...
I've come across some weird bug with Response.Cookies. Or maybe it will be
called "by design" but for the life of me I can't figure out what purpose it
would serve. If you're setting a cookie (say Response.Cookies ("TEST")) and
you have a query string variable &test=x or &Test=x and you get
Request.QueryString to parse the query string, the cookie that gets dropped
matches the case of the query string, not what your code says. ...
|
by: Jim Kelly |
last post by:
Hi,
I'm having a strange problem with setting a cookie's expiration date. The
relevant code is as follows:
HttpCookie hc = new HttpCookie("MyCookie");
hc.Values.Add("UserName", tbUserName.Text);
hc.Expires = DateTime.Now.AddDays(30);
Response.AppendCookie(hc);
| |
by: Pete Davis |
last post by:
I've never done anything with cookies. What I'm trying to do is very
straight-forward, but for some reason, it just doesn't seem to want to work.
I have a helper class with some static methods. Two are for setting and
getting the name of the user to/from a cookie:
public static string GetSiteUser(HttpRequest request)
{
HttpCookie userCookie = request.Cookies;
if (null == userCookie || null == userCookie.Value)
{
|
by: Phillip N Rounds |
last post by:
I'm having trouble with using cookies to monitor the stages of login.
I have a two stage Registration page ( register.aspx ) and my target page
( MyPage.aspx )
I'm using a cookie named LoginStatus to tract the stage of the login
process.
LoginStatus = "1" denotes that the first part of the login process has been
performed.
LoginStatus = "2" denotes that the login process has been completed.
|
by: Gonzosez |
last post by:
How can I set my cookies to expire when the the user leaves the site?
|
by: Will |
last post by:
Is there a good article - or maybe a good chapter in a book - that someone
can recommend on the topic of how to make cookie handling secure?
I'm interested in common techniques for:
- encrypting the cookie
- verifying integrity of the cookie
- organization of different cookie types, and typical entities maintained in
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |