473,471 Members | 4,650 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript with expiring cookie

Mo
I am looking for a JavaScript that will allow me to open a pop-up
window "onUnload". The pop-up window should set a cookie on the users
computer that expires in 'n' number of days.
Jul 20 '05 #1
5 1473
Mo wrote:
I am looking for a JavaScript that will allow me to open a pop-up
window "onUnload". The pop-up window should set a cookie on the users
computer that expires in 'n' number of days.


So, after I leave your site, you want to *attempt* to annoy me by
opening yet another ad window?

And *if* I allow the cookie, do I get cyber-milk with it?

Stop trying to annoy people after they have left your site. They are
gone, let them go in peace.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2
On Sun, 01 Feb 2004 13:35:12 +0000, Randy Webb
<hi************@aol.com> wrote:
Mo wrote:
I am looking for a JavaScript that will allow me to open a pop-up
window "onUnload". The pop-up window should set a cookie on the users
computer that expires in 'n' number of days.


So, after I leave your site, you want to *attempt* to annoy me by
opening yet another ad window?

And *if* I allow the cookie, do I get cyber-milk with it?

Stop trying to annoy people after they have left your site. They are
gone, let them go in peace.


Well, there are valid uses for this function don't forget, even if
better options could exist.

Just what do you have against cookies by the way? When being able to
recognize what one of your customers it is when they visit your site
has always seemed like a good idea to me, when you can welcome them
with like "Hello Randy, Welcome Back!".

Cardman
http://www.cardman.com
http://www.cardman.co.uk
Jul 20 '05 #3

"Cardman" <do****@spam-me.com> wrote in message
news:om********************************@4ax.com...
On Sun, 01 Feb 2004 13:35:12 +0000, Randy Webb
<hi************@aol.com> wrote:
<trim>
Just what do you have against cookies by the way? When being able to
recognize what one of your customers it is when they visit your site
has always seemed like a good idea to me, when you can welcome them
with like "Hello Randy, Welcome Back!".

Cardman
http://www.cardman.com
http://www.cardman.co.uk


I've always thought that was more creepy than anything else. Anyway,
what has opening a new window got to do with setting a cookie? This
can be done anytime from the main window.

Tim.
Jul 20 '05 #4
On Sun, 01 Feb 2004 22:23:22 +0000, Cardman <do****@spam-me.com> wrote:
On Sun, 01 Feb 2004 13:35:12 +0000, Randy Webb
<hi************@aol.com> wrote:
Mo wrote:
I am looking for a JavaScript that will allow me to open a pop-up
window "onUnload". The pop-up window should set a cookie on the users
computer that expires in 'n' number of days.


So, after I leave your site, you want to *attempt* to annoy me by
opening yet another ad window?

And *if* I allow the cookie, do I get cyber-milk with it?

Stop trying to annoy people after they have left your site. They are
gone, let them go in peace.


Well, there are valid uses for this function don't forget, even if
better options could exist.


[snip]

The onunload intrinsic event is unreliable and should be avoided. Browsers
consider different things "unload events". For example, I think IE fires
onunload when a page changes, is refreshed, and when the window is closed.
Opera only fires it when the page is changed. I haven't got around to
installing Netscape and Mozilla, so I can't compare them.

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #5
On Sun, 01 Feb 2004 23:26:25 GMT, "Tim Williams"
<sa************@THISpacbell.net> wrote:
"Cardman" <do****@spam-me.com> wrote in message
news:om********************************@4ax.com.. .
Just what do you have against cookies by the way? When being able to
recognize what one of your customers it is when they visit your site
has always seemed like a good idea to me, when you can welcome them
with like "Hello Randy, Welcome Back!".
I've always thought that was more creepy than anything else.


It can be I guess if you do not know how it works and thought that you
were being spied upon. Like "quick, exit this web page, before it
takes over the web cam and they get to see us naked!". ;-]
Anyway, what has opening a new window got to do with setting a
cookie? This can be done anytime from the main window.


Beats me, but I cannot await the answer.

Cardman
http://www.cardman.com
http://www.cardman.co.uk
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stefan | last post by:
I am using the following code to set a cookie for 30 seconds: $value = $_GET; if (! isset($_COOKIE)){ setcookie('testit',$value,time()+30,'/'); } What happens: 1. On the windows apache server...
3
by: Gav | last post by:
Hi, I have a form which sibmits data to another page. Trouble is when the user refreshes the page it resubmits all the data again. Is there anyway to expire the page immediatly so this cant...
6
by: Québec | last post by:
Hi, How do I get back the expires value of a cookie? .... alert(document.cookie.expires) ... Jean Pierre
3
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",...
3
by: Mike | last post by:
I have a web application that the forms authentication cookie is not expiring correctly. When I look at the trace information of a newly requested page after the session and forms authentication have...
2
by: pv_kannan | last post by:
I recently found out that my authentication cookies are not expiring even though I have set the persist property to false. As a result, users are able to access the secure websites with indifferent...
5
by: Omer | last post by:
hi Everyone, I am using ASP.Net 2.0. When user logins, I check the credential and then made the cookie. My hoster's server is in Arizona region and I am in Pakistan. I set cookie's expiration time...
1
by: chrisx | last post by:
I get java errors in IE with this cookie, any idea why? Also how do I name the cookie and set it to expire in 20 min. I am not that familiar with expiring cookies. Any help is appreciated. ...
3
by: rh.krish | last post by:
I have a typical ASP.NET 2.0 Forms authentication application which authenticates against Active Directory. I use non-persistent cookie so that the user is NOT remembered across browser sessions....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
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 ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.