[open-training-community] How to avoid user to go back after login........

0 views
Skip to first unread message

Devang

unread,
Apr 26, 2010, 9:02:12 AM4/26/10
to open-training-community
Hey,
I dont want to allow users to go back after they login in the system.
So once they login successfully they are not allowed to go back.
How can i do that ???

--
You received this message because you are subscribed to the Google
Groups "open-training-community" group.
To post to this group, send email to
open-traini...@googlegroups.com
To unsubscribe from this group, send email to
open-training-com...@googlegroups.com
For more options, visit this group at
http://groups.google.co.in/group/open-training-community?hl=en-GB

MANISH JAIN

unread,
Apr 26, 2010, 2:36:26 PM4/26/10
to open-traini...@googlegroups.com
one way to restrict the user to go to back is to disable the browser's
back button. u can get the code from the following links..

http://bucarotechelp.com/design/jseasy/95070401.asp

http://www.boutell.com/newfaq/creating/backbutton.html

http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911

Devang Shah

unread,
Apr 27, 2010, 1:21:02 AM4/27/10
to open-traini...@googlegroups.com
Hey,
what i want to do is that if user creates session means it login in the page and now he is in the home page, after then if it trys to go back on login page it's not allowed and the page refreshes on the same home page means it should be redirected back to home page once its session is created.

ankit nevatia

unread,
Apr 27, 2010, 9:46:59 AM4/27/10
to open-traini...@googlegroups.com
hy,

I am also having the same issue.

Can we both get some expert solution :)

Shikha Jain

unread,
Apr 28, 2010, 12:34:50 AM4/28/10
to open-traini...@googlegroups.com
when the user logs in, you must be setting some value in the session variable (say the username or userid).. so you can just check that if the session variable is set then dont allow the next page to get loaded and redirect him/her to home page..

MANISH JAIN

unread,
Apr 28, 2010, 9:20:34 AM4/28/10
to open-traini...@googlegroups.com
As shikha mentined check for the session variable in the login page, if the session is already set, redirect the page to the home page, BUT make sure when you are logging out, the session variable must be destroyed (i.e close the session when user logs out ).

Shardul Bhatt

unread,
Apr 28, 2010, 11:50:06 PM4/28/10
to open-traini...@googlegroups.com
Hi All,

We seem to be missing the point here. The issue is a little more comple. Disabling the back button is not a good option in terms of usability. I don't have a quick and a decent solution to it, but I am sure there is a decent solution available, I am not sure how simple. We as software engineers usually tend to avoid these issues claiming this is a minor flaw and kind of keep pushing it till the end. From my personal experience I would suggest laying a concrete strategy to handle this in the very beginning.


Regards,
Shardul.

Shikha Jain

unread,
Apr 30, 2010, 12:26:23 AM4/30/10
to open-traini...@googlegroups.com
also dont forget to clear the cache memory when you destroy the session variable..
Reply all
Reply to author
Forward
0 new messages