By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,837 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,837 IT Pros & Developers. It's quick & easy.

Method Post with Javasript

P: n/a
Hello

I have got an the Unload Handler is it possible when the Browser is closed
to send a Method post to a CGI program? If yes how can i do this normally i
need to push a Button. Thanks for your help

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Heinrich Klein wrote:
I have got an the Unload Handler is it possible when the Browser is closed
to send a Method post to a CGI program?


Maybe if you muck about with popups - which a lot of people block. But you
can't tell the difference between the window being closed, the user
following a link, the user typing in an address or the user opening a
bookmark (etc).

You also can't do anything about people disconnecting from the network while
the browser is still open.

HTTP is stateless, live it with.

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

P: n/a
"Heinrich Klein" <to*********@gmx.at> wrote in message
news:bp*************@ID-135917.news.uni-berlin.de...
I have got an the Unload Handler is it possible when the Browser
is closed to send a Method post to a CGI program? If yes how can
i do this normally i need to push a Button. Thanks for your help


Forget it. You cannot do anything like that in onunload events reliably.
Once the browser gets the idea that is closing down it stops bothering
to send requests to servers, probably assuming that there would be no
point as it won't be around to receive any responses it may get.

But the request for this functionality is usually to do with some
server-side log off or clean up and demonstrates a lack of appreciation
of the nature of HTTP as a stateless protocol. Usually, in the event of
a user not logging themselves out actively (so most of the time) the
point at which you sort out finalising the state of whatever it is on
the server that may need finalising is when the user's session times
out.

Richard.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.