Skip to main content
Version: 4.1

ClientBrowser

Namespace: Wisej.Core

Assembly: Wisej.Framework (4.1.0.0)

Properties of the client browser currently interacting with the application.

public class ClientBrowser : IUserData

Fields​

NameTypeDescription
CookieStorageCookieStorageReturns an instance of the CookieStorage class that represents the "cookies" storage in the browser.
LocalStorageLocalStorageReturns an instance of the LocalStorage class that represents the "localStorage" object in the browser.
SessionStorageSessionStorageReturns an instance of the SessionStorage class that represents the "sessionStorage" object in the browser.

Properties​

Instance member CultureInfo​

CultureInfo: Returns the locale declared in the application configuration file or detected from the client browser.

Instance member Device​

String: Device type. Can be one of "Mobile", "Tablet" or "Desktop".

Instance member Features​

Object: Returns the set of features supported/not-supported by the browser. Currently we detect: geolocation, webSocket, fullScreen, speechSynthesis, speechRecognition, notification, fullScreen, browserStorage.

Instance member IPAddress​

String: IP Address of the client computer.

Instance member IsDarkMode​

Boolean: Returns true if the browser is using dark mode. Since 3.0.10

Instance member IsFullScreen​

Boolean: Returns true if the browser is in full screen mode.

Instance member IsSecure​

Boolean: Returns true if the connection is secure.

Instance member Language​

String: Client language.

Instance member OS​

String: Client OS. Can be one of "iOS", "Android", "WebOS", "BlackBerry", "MacOS", "Linux", "Windows", "Unix", "Other".

Instance member PixelRatio​

Double: Returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.

Instance member Profiles​

ClientProfile[]:

Instance member ScreenSize​

Size: Screen size.

Instance member SessionId​

String: Returns the session ID associated with this ClientBrowser.

Instance member Size​

Size: Browser size. This is the window size, which can be different from the device (or screen) size.

Instance member TabId​

String: Identifies the browser tab associated with with this ClientBrowser instance.

Instance member TimezoneId​

String: Returns the current IANA time zone name. See timezone. Since 3.5.12

Instance member TimezoneInfo​

TimeZoneInfo: Returns an instance of TimeZoneInfo for the current TimezoneId. May be null when the IANA time zone id cannot be resolved on the server. Since 3.5.12

Instance member TimezoneOffset​

Int32: Returns the time difference between UTC time and local time, in minutes.

Instance member Type​

String: Browser type. Can be one of "IE", "Edge", "Chrome", "Opera", "Firefox", "Safari", "Other".

Instance member UserAgent​

String: Returns the raw user agent string of the client browser.

Instance member UserData​

Object: Returns a value or map set by the client when loading the application's first HTML page.

An application can use this property to retrieve a custom value on startup. For example, in Default.html add:


<script>
Wisej.userData = {
value1: 100,
someName: "test"
};
</script>

On the server side, you can retrieve the user data use at any time like this:



int value1 = Application.Browser.UserData.value1;
string value2 = Application.Browser.UserData.someName;


When used in conjunction with an aspx startup page (Default.aspx) it allows the application to retrieve data passed as a POST request and pass it to the Wisej application.

Instance member Version​

Int32: Browser version.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.