wocommunity / wonder

Project Wonder
http://wiki.wocommunity.org/
239 stars 166 forks source link

WOHyperLink->WOLongResponsePage -> WORedirect caching problem #1014

Open galmok opened 1 year ago

galmok commented 1 year ago

We have a page with a link presented as WOHyperLink that calls an action that creates a WOLongResponsePage using pageWithName and returns the page.

This works. When clicked, a new browser window is opened in which the WOLongResponsePage is running (HTML rendered, performAction called), itself calling a 3rd party site and constructs an URL that the pageForResult returns a WORedirect to.

So far so good.

The problem arises when that browser window is closed and the user again clicks on the WOHyperLink. In that case, the result from the previous WOLongResponsePage is used (i.e. redirect to previous constructed URL). No new WOLongResponsePage is created.

The third time a user clicks on the WOHyperLink, the result is the HTML is rendered as the first run, and the WOLongResponsePage isn’t created. This time however, the redirect doesn’t happen and the user is stuck at the WOLongResponsePage (that isn’t refreshing).

I feel there must be a way to signal that the original WOHyperLink result must not be cached/reused, making it always call the action that creates a new WOLongResponsePage. I just can’t see how to do this.

Any hints?

If the page with the WOHyperLink is refreshed, then a new WOLongResponsePage is created, but the user won’t know that.