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
https://forums.phpfreaks.com/topic/210906-javascriptajax-auto-logout-mechanism/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.