Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Tracking user exits

by jeorgen (Pilgrim)
on Sep 06, 2000 at 20:25 UTC ( [id://31277]=note: print w/replies, xml ) Need Help??


in reply to Tracking user exits

Speaking about communicating to the user what is happening:

One on-line bank I use logs me out if I don't do anything for a while, and shows a message to that effect in the browser window. I do not know how they actually do that, but one way could be to use some session time stamp, preferrably on the server side, and then combine that with a content-refresh meta tag or http header with a time set to the time out of the session.

So if a user keeps a web page open for t seconds, the page will reload and a message will appear that he's been logged out (if the session info indicates that so should be done).

/jeorgen

Replies are listed 'Best First'.
(crazyinsomniac) RE: Re: Tracking user exits
by crazyinsomniac (Prior) on Sep 06, 2000 at 22:03 UTC
    Use a 'javascript' refresh.

    One reason why, if a user hits cancel, the meta refresh gets canceled, while a javascript/one doesn't if you just call your function without using any events like so

    <script language=javascript> <!--// var counter=1000; var urla="http://pathto/logout.cgi"; function stoperror(){ return true; } window.onerror=stoperror; function countdown() { if(counter==0) { window.location=urla; } counter--; setTimeout("countdown();",995); } countdown(); //--> </script>

    "cRaZy is co01, but sometimes cRaZy is cRaZy".
                                                          - crazyinsomniac

      Of course, anyone who has been reading the CERT alerts for the past few years already has Javascript (and perhaps Java) disabled while surfing the Wild Wild Web, so this solution won't work.

      In fact, there are provably more people with Javascript turned off today than ever before. So we'll have to increasing provide solutions for problems that do not use Javascript. Get used to it!

      -- Randal L. Schwartz, Perl hacker

        That is very true,
        which is why you make having JavaScript enabled a requirement for logging in to your( or whoevers) website.

        "cRaZy is co01, but sometimes cRaZy is cRaZy".
                                                              - crazyinsomniac

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://31277]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-19 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found