I have an application with a relatively standard search screen.
The issue is that when someone clicks back, despite the fact that the search term is correctly stored in a session variable, the actual list results are not being refreshed.
I've read in other places that this is because the back button doesn't trigger the preperation or the refresh.
I've set the cache time to 0 on the search page, and attempted to keep the result set in a session variable. Neither of those seem to help.
The question I have: Is there a way to detect that a user got to this page via the back button, and force a page refresh action?
I think Thomas solution is roughly the same as :
https://www.outsystems.com/forums/discussion/8206/how-to-disable-back-button/#Post58684
J. wrote:
Yes, I think that's the one that was being referred to.
Hi Tom
When you refer "back button" are you talking about browser back button, or is it a link in your web application?
I think the back button form browser, preserves the last fetched list. In the case of an application link, you can add a boolean input parameter to your scren, that is filled with true, when you click in back link.
I have the same question as Tom.
For clarity:
I have a page https://www.temples.co.uk/ if you type some numbers in the min and max price and press Search you will go to the next page as expected. If on this page you alter the values the search is executed as expected (onChange).... but if you press the browser back button the old min and max values are presented - not the new session variables.... how can I force this screen to refresh to display the session vars?
Thanks
Gary
What I ultimately ended up doing, though I don't recall where I found it to add a link to it, was the following:
"$('#" + Refresh.Id +"').val() == 'yes' ? location.reload(true) : $('#" + Refresh.Id +"').val('yes'); return false;"
Thanks Guys... the link to the post https://www.outsystems.com/forums/discussion/8206/how-to-disable-back-button/#Post58684
Worked for me.! :-)