345
Views
3
Comments
Solved
Trying to get the previous external page using getReferrer
Question
Application Type
Reactive

Hi everyone!


I have an Outsystems Reactive App that is called from external urls. I am trying to save this external url, so when the user clicks on a "Back" button, it goes back to the site where it came from. 


To do so, I am trying to use the action: GetReferrerUrl.

I put it on the Initialize of the page. 


However, the value it is saving is the url of my own page, not the previous page where the user was before. Does anyone have a clue what am I doing wrong, or if I should make it in  a different way?


Any help is appreciated. 


2018-10-29 08-31-03
João Marques
 
MVP
Solution

Hi Bruna,


You can do that easily without going to the server, using JavaScript:

 

Using the JavaScript snippet below, you will get the previous URL in the ReferrerURL output parameter.


Kind Regards,
João

2025-01-23 05-58-39
Jamal Mohammed

This is not working as expected . document.referrer return empty always. 

2023-04-14 07-58-09
chappy

Hi Joao Does this resolution apply to mobile?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.