I am working on web app in OutSystems 10.0. In the application, if I log out, it logs off. But when I click the browser back Button, it redirects to the Previous page (which should be displayed only after login). Any suggestions?
-
1Have a look to http://www.outsystems.com/forums/discussion/8206/how-to-disable-back-button/#Post58684. The .oml document is included there. Just do what he suggested with every page in your application. – Abdulhakeem Apr 26 '17 at 05:56
4 Answers
You probably need to have roles on the pages, if the pages have the role anonymous anyone can open it.

- 56
- 2
You're probably accessing the website via http and not https, so when you press back on the browser it will show you a cached version of the previous page.
Because it's the cached version, the session and roles are not checked.
As a recommendation, force the https protocol.

- 175
- 2
- 8
Following the link provided by @Abdulhakeem, they recommend the following:
- Add a hidden input to the page - initialize it to some value (for example 'no') - so when the page is rendered by the server it always has a 'no'
- Add a bit of Javascript to the page ready event to:
- Check that value - if it's not what you'd expect from the server (in our case, <> 'no'), force refresh the page (see below)
- If it is still set to what you'd expect from the server, change it (in our case to 'yes') and do nothing else
I recommend downloading the .oml provided in the post and reviewing how they actually implemented it.

- 467
- 11
- 21
if you can change to https, you can also in every action that is on the page that do changes on the database. check if you have permissions or you are logged. that way if the person tries to do back and do some action you can redirect it somewhere.

- 9
- 3