WebSession

From Xojo Documentation

Class (inherits from Object)


New in 2010r4

This is the base class for the Session class that is included in all web projects. Each user session gets its own instance of WebSession that you can access using the Session method.

fa-info-circle-32.png
To refer to the current Session from within the Session object, use Self instead of Session as the prefix, especially in the Opening event because it may return Nil.
Events
Activated HashTagChanged ScaleFactorChanged
AllowUnsupportedBrowser JavaScriptError UnhandledException
AppearanceChanged Opening UserDisconnected
Closing OrientationChanged UserTimedOut
DataReceived PreparingSession
Deactivated RequestedData
Properties
AllowTabOrderWrap DisconnectMessage LanguageRightToLeft
ClientHeight fa-lock-32.png HashTag Platform fa-lock-32.png
ClientTime fa-lock-32.png HeaderCount fa-lock-32.png RemoteAddress fa-lock-32.png
ClientWidth fa-lock-32.png Identifier fa-lock-32.png ScaleFactor fa-lock-32.png
ConfirmDisconnectMessage InterruptionMessage URL fa-lock-32.png
Cookies fa-lock-32.png IsDarkMode fa-lock-32.png UserTimeout
CurrentPage LanguageCode


Methods
ExecuteJavaScript PageCount SaveState
GotoURL PageWithName Secure
HasPage Pages URLParameter
HasPageNamed Quit URLParameterCount
Header RawHeaders URLParameterExists
HeaderAt RecordData URLParameterName
HeaderCount RemoveData
PageAt RequestData

Notes

Use the Session object to access the current user session.

To refer to the current Session from within the Session object, use Self instead of Session as the prefix, especially in the Opening event because it may return Nil.

Databases

If your application is going to connect to a database server, you will want to store the database connection in a property of the Session class. This will allow your application to make connections to the server on a user-by-user basis.

Query Parameters

To access the query parameters, use the URLParameter methods to retrieve the query parameters from the Session object.

See Also

Session, WebSessionContext classes.