• I have an action hooked into wp_logout. If the user doesn’t explicity log out (for example, closes the browser window) then I still need to invoke my action. Does anyone know how to do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • no, and I dont think that can be done.

    closing the browser isnt something that wordpress can detect. Not even apache “sees that” immediately.

    even on a network level, there’s still going to be open connection while the time-wait is happening.

    Thread Starter dxsmith

    (@dxsmith)

    I’m quite happy to tie into the session expiry. Any idea how to do that in php?

    Thread Starter dxsmith

    (@dxsmith)

    I’ve decided to go with a manual solution. “Please remember to log out after your visit.” ??

    You could be annoying and have a session timer with a popup… click here to extend your session another 15 mins…or ending in 5,4,3,2,1…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Invoke action when broswer window closed’ is closed to new replies.