PostBack Problem

PostBack Problem

I created the Login screen with new userdetails table[Created on our side].So i check the Valid user name & Password using Query and Store both userId and Username in session.On clicking the Logout i Clear both Value from the session.In this case, When i click the Logout the screen goes to Login screen.Again i click the back on IE it came back to previous screen.Here the Preparation will not Fire.So please suggest to Avoid this Situation.

Hi Devaraj,

I am not sure I understand the question.

Indeed, if you press "Back" on your browser, the behavior will depend of the browser you are using, and most of the time they will just read form the web cache and display the last page you were in.

Is your question on how to avoid this behavior? What use case are you really trying to avoid? What I usually see that does the trick is forcing the window to close after logging out - some e-banking sites do that. You can do that with Javascript if I'm not mistaken.


Paulo Tavares
thanks for your Reply,

sorry i m not explain well i think, i didn't have any popup screen.Just i m login through login screen and go to home page.Now i click logout in this action i clear my session values and pass the [Flow] login screen .Now i click back button in IE it again move to Home page.
I need if i click logout and click "Back" in IE it will not go to previous screen.
Please give your suggestion to solve this problem.

Hi Devaraj,

If you are trying to prevent the user from navigating to the previous page, as far as I am aware that can only be done using Javascript.

I did a Google search on the subject, and I found this document which covers the issue. I hope it helps.

Any other Javascript solution will do as well, if you happen to find others while searching for it. You can insert Javascript in any OutSystems page by using an Expression widget, and setting its "Escape content" property to false.


Paulo Tavares
I have the same problem .Any javascript solution?
Hello Luis,

Would it be a solution to redirect the user trough another page?

So the logout link/button (on submit) calls an action which logout the user and at the end of that action a hidden button in that screen is called which has an submit to the login page. If you then cuse the back button you come on the previous page and are directly linked to the next page again.

I only don't know if this also works if you click the back button more times.

You could think about this kind of solution, just redirect the user to a 'blank' page which logout the user en link it to another page. Clicking back will only show the redirect page where the user is directed to the login page again.

Kind regards,