Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Page Timeout

  • 09-08-2006 2:12pm
    #1
    Registered Users, Registered Users 2 Posts: 1,305 ✭✭✭


    hi,

    i was just wondering if anyone could help me with this:

    i'm looking for a way to get a page to redirect to a another page after it has been idle for 15 minutes.

    so when the 15 mins are up the user is forwarded automatically back to the login page.

    i was trying the "meta-equiv = refresh" tag but that refreshes the page whether its been left idle or not and its not really what i'm looking for.

    any suggestions?

    thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 304 ✭✭PhantomBeaker


    This is only a rough sketch in my head but I'd probably go about it in the following way with something like javascript.

    Put your page in a VERY large div. Basically something where you can attach a mouse listener of some description (like onmousemove - see http://www.w3schools.com/tags/ref_eventattributes.asp ). Then if write a function that resets your timer back to 15 minutes. Otherwise, have a function that's counting down to 0 every minute or second or whatever (probably some script that's run using onpageload).

    So that's trying to count down, but every time you move the mouse in that page you reset the timer.

    that's the sketch. How to actually implement it is another matter, but I think it's mostly there.

    Aoife


  • Moderators, Politics Moderators Posts: 41,234 Mod ✭✭✭✭Seth Brundle


    was this not aasked recently?
    You want a server timeout from what I gather. Surely 15 minutes is sufficient per page? What will your users be doing for 15 minutes that rules out the meta-equiv = refresh?


  • Registered Users, Registered Users 2 Posts: 378 ✭✭sicruise


    Your best bet is sessions and when the user is inactive for 15 mins and he tries something he will be redirected to the login page...


  • Registered Users, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


    I had a big example done up, but then I realised that PhantomBeaker's idea is exactly what you need. I think the onmousemove tag can be put directly into the body tag though, so no need for the container div.

    Sessions won't work as you seem to want to capture any mouse movement. By the way, a "page timeout" usually means that a page could not be served by the webserver as it took too long to process.


Advertisement