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):
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.
Adding a call to Session.Quit gives better behavior:
session.Interruptionmessge = "Your session has ended. " + endOfLine + "Please re-load this page to continue"
Turns out I was also closing the web page, e.g.
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.