Ajax refresh between web screen

I have a web page that can be access via a link. The web page will do some editing of data that the calling web page is using. Is there a way to update the calling web page information that the called web page updated when the person clicks the back button? I know if the calling page is refreshed, it will show the updated information after the back button.

Thanks

Kevin

Solution

Hi Kevin,

for that to happen you need to use JS. This component has a widget called "Back Refresh" which is a JS wrapper that you can include in the page you want to refresh when is reach with back button.

Regards,

Marcelo

Solution

Hi, friend.

Whats kind of data you need to update in the previows screen? Depending on it, you can do that by a session variable.

Session variables are indicated to pass strings or small datas only.

Lenon Manhães wrote:

Hi, friend.

Whats kind of data you need to update in the previows screen? Depending on it, you can do that by a session variable.

Session variables are indicated to pass strings or small datas only.

The date being updated is in a table. The calling screen is not being refresh to get the update table when someone hits the back button. 


The back button normally do not trigger the preparation.

The best way is put a button with navigate method to the previows screen.

Hi Kevin,

I'm not sure if I understand your question correctly; but I think you are talking about the browser cache. So this is not specific to OutSystems; when user clicks the back button in the browser, the previous page is loaded from cache without a server roundtrip.

This behavior can be changed by setting the HTTP header "Cache-Control" to "no-cache".

You can have a look at the following reference: https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/HTTPRequestHandler_API#AddHeader

Lenon Manhães wrote:

The back button normally do not trigger the preparation.

The best way is put a button with navigate method to the previows screen.

For now I will have to discuss with the user if they want a back button added to the page.


Hi Kevin,

Did you check my option?.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Kevin,

for that to happen you need to use JS. This component has a widget called "Back Refresh" which is a JS wrapper that you can include in the page you want to refresh when is reach with back button.

Regards,

Marcelo

Marcedo, 

I missed your reply. So the JavaScript would have to be added to the calling page or in the called page? Also  I assume performance.navigation.type is a system variable? 


Hi,

You need to added this to the page you are going after you hit the browser back button.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi,

You need to added this to the page you are going after you hit the browser back button.

Regards,

Marcelo

Marcedo

It worked. Thanks Kevin


Glad I could help. Plz mark the post I shared the component as solution so other users with same problem know which path should they take.

Regards,

Marcelo