Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8795521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:24:17+00:00 2026-06-13T23:24:17+00:00

My application currently stores some basic _SESSION events, such as login and each page/URI

  • 0

My application currently stores some basic _SESSION events, such as login and each page/URI requested. I’ve been asked to enhance event logging to include tracking when users log out.

The trouble with logouts is that users don’t always remember to click a dedicated Logout button. Sometimes they just leave the browser open, or close the open browser windows, or simply shut down. I can’t always be guaranteed an exact logout event.

I can get a rough idea of user logout times by querying my event table for periods of no activity, however this seems roughshod.

Is there a best practice for detecting passive logouts in PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:24:18+00:00Added an answer on June 13, 2026 at 11:24 pm

    You basically have your answer – no activity means they have logged out.

    If your server can handle it, and it’s really important, you can set a Javascript timeout to “ping”every minute. If you get the ping, then the browser is still on the page, if you don’t, they have probably moved on. Exactly when you define “logout” though is still a little bit of guess work, add the user may leave the page then return later while the session is valid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a Global variable/class that stores some basic information about the currently logged
Our application currently stores bunch of configuraton & application specific data to files on
I have an application that I'm converting to Symfony/Doctrine. It currently stores a serialized
I have an application that currently stores timestamps in MySQL DATETIME and TIMESTAMP values.
I am currently building an application that generates images and stores them in an
I'm currently developing a DynamoDB-backed application that stores customer-related data for a large customer
Currently i am working in Android application, Using plist to store some values in
I'm currently learning C++ and there are some (basic) things which I don't really
I'm currently developing a web application. I know some basics of Spring, however I
I'm doing some basic security work for an application. When a user logs in,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.