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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:56:36+00:00 2026-05-31T23:56:36+00:00

Is there a way to disable the browser’s back button after loggin out? I’ve

  • 0

Is there a way to “disable” the browser’s back button after loggin out?

I’ve read several posts and now I know, that I can disable caching.
( e.g. ASP.NET authentication login and logout with browser back button )

This is working, but I want to disable the back button for security reasons only after logging out (= when there’s no Session available anymore).

If I disable caching, the user cannot use the browser’s back button while logged in.

I’m using a custom authentication, not the standard of asp.net

Is there a secure (= no javascript) possibility to do this?

  • 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-05-31T23:56:38+00:00Added an answer on May 31, 2026 at 11:56 pm

    As I’m sure you already know, you can’t directly disable the “back” button on a browser.

    The only methods for preventing a user from going back rely on either setting the page to cache, or involve the use of javascript. Based on the fact that neither of these work for you, there isn’t a solution to manage this. I’ve looked at many articles over the years, and re-searched this several times, and all of the suggestions either use client-side script or the cache.

    My best suggestion in your case is to use the cache disable method, and look at how your UI responds to the “back” button and see if there are changes you can make to the design to make it smoother. This may involve checking the session variables, or checking to see if the user is still authenticated, but given your requirements, I believe you’re out of luck.

    In short, you’re going to need to choose the lesser of two evils.

    • Using the page cache will ensure that people can’t use the “back” button at all without using javascript – presumably better security
    • Using the javascript to delete page history on logout will allow you to prevent users from going back after logged out, but someon ewith noscript turned on, or someone malicious can disable your control.

    You didn’t specify exactly who you are trying to protect, and from what, but if I’m guessing right, and you’re concerned about the user who leaves their PC after logging out, but without closing the browser window, then is the Javascript really a concern?

    Thinking it through,the type of person who would do this isn’t thinking about how the info can be used maliciously. Someone who is malicious, presumably, is already “thinking like a bad guy” and knows enough to close the browser window.

    Either option could be bypassed via malware that intercepts/alters the http headers, javascript, etc, so neither is really 100% effective. The only difference I see is that the javascript option can be broken both by altering the html as it travels across the wire (using something like Fiddler or malware) AND by simply having Javascript disabled. so the page cache option is marginally better for security purposes.

    Using https instead of plain http offers a lot more protection in combination with the header method, making it much more effective, because it greatly increases the difficulty of manipulating the data across the wire, and it’s not disabled simply by disabling JavaScript.

    Either way, I think you need to weigh your options and choose one or the other. As sad as it seems, we can only do so much to protect the users from themselves.

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

Sidebar

Related Questions

Possible Duplicate: Disable browser's back button Is there any way to disable browser(specifically IE)
Duplicate of Disable browser save password functionality Is there a way to tell the
Is there any way to disable the Same-origin policy on Google's Chrome browser?
Is there a way to disable the right click for the back and forward
how can I disable the browser's Back button in a HTML page? I do
Possible Duplicates: Disable browser's back button How do I disable the F5 refresh on
Is there any way to disable that? I only mean in the browser... When
Possible Duplicate: Disable browser ‘Save Password’ functionality Is there a standard way to prevent
Is there a way to disable entering multi-line entries in a Text Box (i.e.,
Is there a way to disable LINQ's object tracking features, without also disabling lazy-loaded

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.