Back Button for Back in Browser History

on 01 Oct 2019
Platform Server Release Oct.2019 CP6

Sometimes we have to go back to a previous page.

We can do it in 3 ways:

1 - A button that has a specific link!

For example, I'm in a page with a List of Employees, and click in one of the Employees in the list, going to his Detail Page. There I have a button saying back that goes back to the list.

The problem of this solution is that If I can access the same page from a different place, when I click the back button I go to the Employee List Page and not to the page I was.

2 - A button that runs a Javascript!

I can have a button that runs the following javascript :


        return false;

This reproduce the back button web browser behavior.

The problem of this solution, are the Pop-Ups. If you open a Pop-Up in the page you are and run the javascript above, it goes back to the same page again. So in the end you stay in the same page.

3 - You can pass the Original URL as a parameter.

If you pass the Original URL as an input parameter of the next page you will access, you can always redirect the user to this URL again through a button or a link.

The idea is to make this a pattern!

OutSystems pages could always receive this Original URL input parameter behind the hood.

And could exist a component that would be a button or link that when clicked, redirects the User to this hidden URL.

This way we can always have the possibility to send the User back to the previous page!

Created on 12 Apr 2018
Comments (15)

Changed the category to Frontend

Hi Raphael,

We already have such pattern in mobile, where you can navigate to a previous screen. Are you  talking about a similar approach for the web?


Ricardo Alves

There's a server variable called HTTP_REFERER and it looks like you can access it from 


@Ricardo Alves, Yes it would be something similar.

@PJ M If I'm not mistaken, the referer URL dont work in the cenario you do a submit request for the same page.

It will work. In the case of a submit to the same page, the referrer will be the name of the page you are on. In other words, if a page submits to itself, then the referrer will be itself.

@PJ M   Exactly. This is what can't happen.  The purpose of the idea is to go back to the previous page that is not itself. It is the same problem of the case 2 in idea.

@Raphael, You've made a change to your requirements then, because if you can't go back to the previous page, then your suggested option of #2 wouldn't work either.

To do what you want, you'd have to store the referrer, then only go back to one that isn't the same page.

@PJ M... Yes the options 1 and 2 don't work! 

I just wrote them, because they usually are used, but they will not work. 

This is why I put in the end of them that a problem exist.

The only solution I see is what I wrote in option 3!
This is the idea!

Changed the status to
Working on it
expected delivery in Q4 2019

Hi Raphael,

Great idea. We are currently working on the next generation of web applications (you'll hear a lot more about it soon), and in those you'll be able to navigate to the previous screen (as you already can in mobile).


Tiago Simões

Hi there!

Any updates on this matter?

Thank you!


[EDIT]: I see that on reactive I can use the "Previous Screen" to navigate.

Don't know if this was what @Tiago Simões was referring too, but for me, it kinda works.

Changed the status to
on 01 Oct 2019

Hi Telmo,

You are right. With Reactive Web Applications it's now possible to do this easily.

Thank you, Raphael for your idea.

Tiago Simões

Still not implemented for traditional web? Is it still to be expected?

Hi Peter,

No, it's not implemented for traditional web, and we don't expect to do it.

For the sake of transparency I would also like to share that we are not planning new features for traditional web (which is based on old ASP.Net webforms). We are focusing all our efforts on reactive and mobile apps, which use a modern architecture (based on React) and allow our customers to create better applications.

We'll share more information about this soon, but if you have any further questions please let me know.

Tiago Simões

Thanks for the answer.

Just tested in a reactive project and it works like a charm.

Is there a specific reason that an automatically created listpage with detailpage does not use the back-pattern on the Save and Back buttons?

I have tested the previous screen option as well in reactive. However, if I opened a pop-up earlier in the page, the previous screen action will stay on the same page and will open the pop up again. 

Is there another way that this idea had been implemented so that this does not happen?