Mike_D
(Mike D)
August 5, 2022, 2:06pm
1
In my Web2 project, I have a “logout” feature which simply tells the session to go to another URL (which is not a Xojo web URL):
Session.LogOut(url)
session.GotoURL url
This works fine, but I’m noticing that in Xojo 2022R2 if the user then hits their browser’s Back button:
you see the session.interruptionMessage dialog for a second
then the entire page goes blank
Inside the webApp, I don’t see any logs indicating what’s happening, and why the user sees an empty/blank screen.
Any ideas?
Mike_D
(Mike D)
August 5, 2022, 2:12pm
2
Adding a call to Session.Quit gives better behavior:
Session.LogOut(url)
session.GotoURL url
session.Interruptionmessge = "Your session has ended. " + endOfLine + "Please re-load this page to continue"
session.quit
Mike_D
(Mike D)
August 5, 2022, 2:32pm
3
Turns out I was also closing the web page, e.g.
WebButtonLogout.Pressed
Session.GotoURL(url)
self.close // closes the web page
Therefore it makes some sense that when the webApp restores the session, it ends up with a blank page.
I’m not sure if this is a bug or perhaps expected behavior…
Yes Mike, unless you Quit the session, the browser could restore the session now (i.e. they switch to another app on their mobile and come back later), so that seems expected.
Session.Quit in a LogOut method seems the reasonable way of handling this.