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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:11:26+00:00 2026-05-30T17:11:26+00:00

is it possible to redirect to login page when timeout occurs without waiting for

  • 0

is it possible to redirect to login page when timeout occurs without waiting for the user to click on anything first?
Right now, when timeout occurs, the page user was on still displays but as soon as user clicks on anything it goes to login page.
Thanks.

  • 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-30T17:11:27+00:00Added an answer on May 30, 2026 at 5:11 pm

    You need to check on the client side if the session has expired. The easiest way is to simply start a countdown (as long as the timeout) using javascript when the page has been loaded. When it expires, send the user to the login page. Or maybe better: just let the user know that the session has expired, because maybe he wouldn’t be too happy if you just send him somewhere. Although my online banking software does exactly that, but for security reasons, of course.

    Here’s a very simple example: http://jsfiddle.net/39Sj6/1/

    function sessionHasExpired(){
        if(confirm("Your session has expired. Do you want to go to the login page")){
            window.location = "http://google.com/?q=login";   
        }
    }
    
    var sessionTimeInMilliseconds = 1000*60*5; // here: 5 minutes
    setTimeout(sessionHasExpired, sessionTimeInMilliseconds );
    

    (In jsfiddle you won’t be redirected to google as this is forbidden by jsfiddle, but in principle it would work)

    ​

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

Sidebar

Related Questions

Is it possible to perform a redirect when using @Ajax.ActionLink to the login page
Is it possible to catch a classical ASP Scripting Timeout and redirect to a
Is it possible, if so how(!), to auto redirect a user that doesnt have
I have a download folder. So is it possible to redirect a user to
Possible Duplicate: How to redirect users to another page? I'm a beginner in the
I created a django application with a user login/registration page. I am trying to
Possible Duplicate: How to let Facebook Login button redirect to a particular URL I
Possible Duplicate: .htaccess Problem - ( Turn off SSL for every page except login.php
I'd like to have login and logout on the first page of my grails
Is it possible to redirect all of the output of a Bourne shell script

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.