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 9223709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:08:11+00:00 2026-06-18T04:08:11+00:00

Project Context Client requires that the users of the site (when logged in and

  • 0

Project Context

Client requires that the users of the site (when logged in and are able to view their personal information) be forced to be logged out if they try to navigate using the browser’s navigation buttons.

My Research

Searching around on SO seems to indicate that most of the problems people have is to "stop" people from hitting the browser’s back button when they’re logged out, like this and this. The difference is that I need to "stop" the users from navigating backwards in history (and even forward as well, though I don’t see how the users can go forward in history if they can’t go back in the first place) even when they are logged in, making it compulsory that they use the provided navigation.

The Solution I Have In Mind

I’m thinking of capturing the browser’s event when a user hits the back button and logging them out then. However, as discussed here it seems like you can only "do it" using Javascript and not using server-side code. My qualm with this approach is that users can bypass it merely by disabling Javascript on their browsers.

My Question

So my question is – Is there a way I can capture the browser event on the server-side and log them out there? If not, what are the alternatives to achieving my objective?

  • 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-18T04:08:12+00:00Added an answer on June 18, 2026 at 4:08 am

    I’d say that your best option is tracking the session.

    You make the client send you the timestamp of when the request was processed by your server, or even simpler: a user dependent counter (which you send each time to the client), and server-side keep track of the last timestamp/counter sent.

    If the user clicks the back button, he will send you an old timestamp/counter instead of the last current one, and you can then log him out server side.

    This should do the trick.

    In order to make sure the trick is done and making it javascript independent, I’d say you could place this value in a hidden parameter, or maybe as a hidden field form, so the user doesn’t see it but it always gets sent to your server.

    I hope this helps!

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

Sidebar

Related Questions

Context: I'm working on the design of a Project that involves a web client
I'm working on a project that is trying to use context-free grammars for parsing
I am updating a client site that uses Jetbox CMS v2.1 . I need
I'm working on a new Django project, and the client wants to feature content
I currently load my properties file like so in spring <context:property-placeholder location=test-esb-project-config.properties/> <context:property-placeholder location=esb-project-config.properties/>
In my current project we have a large repository of content that was originally
The static html pages of my project has javascript dynamically modified content and that
I am developing an application that distributes rendering across several devices (a university project).
I have a project setup - it is a Silverlight Client Application hosted in
my project run on: hXXp://localhost:8080/mvc but when I rebuild on client part it would

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.