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

The Archive Base Latest Questions

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

I have a custom logout page. When user clicks logout this page is reached

  • 0

I have a custom logout page. When user clicks logout this page is reached (and logout status is saved in database). There is no login mechanism. If a user tries in a new window he is allowed to view the page and logout status is changed as logged In.

Once logged out, when user is clicking back button (from logout page), it should not allow user to view previous page.

Similarly: When user access a page, the time is stored. When he is idle for 20 min and attempt an operation he will be redirected to session timed out. He should not be able to view previous page on back button click.

Currently in each page I am checking the database status and redirecting to logged out page again if status is logged out. But it causes the page to load first and then do validation in javascript and then redirect. Is there a better way to handle this?

Note: I am posting it as a new question based on the comment in Clear browser history

        $.ajax(
        {
            type: "POST",
            url: "LogOut.aspx/GetActiveIndicatorStatus",
            data: '{"empID": "' + empID + '"}',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: navigateBasedOnStatus

        }
        );


//Helper Function
function navigateBasedOnStatus(result) {


    if (result.hasOwnProperty("d")) {
        result = result.d
    }

    //alert($.trim(result));

    if ($.trim(result) == "LoggedOUT") {

        window.location.href("LogOut.aspx");
    }
    else 
    {
        contentHolderDiv.css("display", "block");
    }


}

REFERENCE:

  1. Clear browser history
  2. Dynamically add href on <a>
  • 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:53:09+00:00Added an answer on June 13, 2026 at 11:53 pm

    Scenario 1: don’t Ajax:

    If you are on the page the user may not see again,

    window.location.replace("LogOut.aspx/GetActiveIndicatorStatus?empID="+empID)
    

    will replace the page you are on with whatever you return.

    Scenario 2: replace in the result:

    if ($.trim(result) == "LoggedOUT") {
    
        window.location.replace("LogOut.aspx");
    }
    else 
    {
        contentHolderDiv.css("display", "block");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a published button in my web page but i need logout user
I have a custom Lync application for changing a user's status/presence. For the app,
I have custom UITableViewCell . It contains UITextLabel . When I press this cell
I have custom validation rule: public function customRule($check) { } Inside this rule I
I have custom gallery. Gallery represents items that are frame layout. There are one
I am trying to integrate my custom user system with Wordpress, and I have
In this tutorial he creates a custom login form, just to show how it
I have custom errors turned on in webconfig and redirecting to /Error/Trouble. This is
I have custom radio buttons which I've borrowed from this website: http://www.inserthtml.com/2012/06/custom-form-radio-checkbox/ Unfortunately, I'm
I have application where i have put custom text Connect. on fb-login button but

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.