Jump to content

Javascript/ajax auto logout mechanism


jekillen

Recommended Posts

I have coded a site architecture that creates a file when a client contacts the site. It is created as a php script so values can be retrieved with

include() or require(). My problem is detecting when the client has left the site so the file associated with the client can be deleted, or moved

to an archive.

 

I have done this with the use of a frameset file that displays all the site content. THe frameset has an unload event hancller and ajax is used

to advise the server that the site has been left. (the idea is that the frameset is loaded as long as the user is in the site, and would only

detect unload if the user navigates out of the site)

But I need access to location field, or bookmark information, and the 'home' button in browsers. I don't know if this is possible. I have been

testing with a simple alert onunload. This alert will not run if I use a bookmark or the 'home' button in Firefox (and I presume that applies

to all or most other browsers. I am aware of the location object, but in the situation, it does not seem to represent what the user has typed

into the location field.

 

I have done tons of php and javascript; I just need a reference to answers to question about bookmarks and other location related browser

functions.

 

Otherwise I will have to manually delete accumulated client tracking files-- and wonder which ones represent active clients.

 

Thanks to anyone spending time and interest

JK

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.