Back button

  

Hi,


I am trying to solve a problem:



Imagine that I'm navigating from page 1 to page 2. When I click to change my language on page 2 and then I click the back button of browser, it only goes back to the previous language and not to page 1. Then I have to click it again to go to page 1. And more times I change the language, more times I have to click back, since it just changes the language of the page.


Someone had this problem?


Thanks!

Hi Pedro,

You should try to avoid using the back-button of your browser, but if you have to overwrite the functionality of the history of the browser, you can checkout the following API and build your own functionality in JavaScript.

The better solution is that you store where you are coming from when going to page 2 and on change of the language, redirect to the stored referrer page. With a redirect, the page is refreshed and the new language settings are taken into account.

Kind regards,

Remco Dekkinga

Remco Dekkinga wrote:

Hi Pedro,

You should try to avoid using the back-button of your browser, but if you have to overwrite the functionality of the history of the browser, you can checkout the following API and build your own functionality in JavaScript.

The better solution is that you store where you are coming from when going to page 2 and on change of the language, redirect to the stored referrer page. With a redirect, the page is refreshed and the new language settings are taken into account.

Kind regards,

Remco Dekkinga


Thank you! I will try, and after that I will post here the final fix!


Hi Pedro,


Did you found one solution?

Please take also a look on this:

https://www.outsystems.com/forums/discussion/8206/how-to-disable-back-button/#Post58684