Home > Class Reference > %SYS namespace > %CSP.UserAgent

%CSP.UserAgent

class %CSP.UserAgent extends %Library.RegisteredObject

Determine browser parameters from HTTP_USER_AGENT CGI variable.

Properties

property Browser as %String;
Browser name
Property methods: BrowserDisplayToLogical(), BrowserGet(), BrowserIsValid(), BrowserLogicalToDisplay(), BrowserLogicalToOdbc(), BrowserNormalize(), BrowserSet()
property Platform as %String;
Browser platform
Property methods: PlatformDisplayToLogical(), PlatformGet(), PlatformIsValid(), PlatformLogicalToDisplay(), PlatformLogicalToOdbc(), PlatformNormalize(), PlatformSet()
property SupportsXMLHttpRequest as %Boolean;
Supports XMLHttpRequest.
Property methods: SupportsXMLHttpRequestDisplayToLogical(), SupportsXMLHttpRequestGet(), SupportsXMLHttpRequestIsValid(), SupportsXMLHttpRequestLogicalToDisplay(), SupportsXMLHttpRequestNormalize(), SupportsXMLHttpRequestSet()
property UserAgent as %String;
User agent for this class.
Property methods: UserAgentDisplayToLogical(), UserAgentGet(), UserAgentIsValid(), UserAgentLogicalToDisplay(), UserAgentLogicalToOdbc(), UserAgentNormalize(), UserAgentSet()
property Version as %String;
Browser version
Property methods: VersionDisplayToLogical(), VersionGet(), VersionIsValid(), VersionLogicalToDisplay(), VersionLogicalToOdbc(), VersionNormalize(), VersionSet()

Methods

method %OnNew(userAgent As %String) as %Status [ Language = objectscript ]
Initialize with HTTP_USER_AGENT.
classmethod XMLHttpRequest(userAgent As %String, ByRef browser As %String, ByRef platform As %String, ByRef version As %String) as %Boolean [ Language = objectscript ]
XMLHttpRequest returns true if XMLHttpRequest object is supported by the browser indicated by the userAgent. Current implementation parses User Agents beginning with:

Inherited Methods

Mozilla/4.0 (compatible; MSIE
Mozilla/5.0 (compatible; MSIE
Browser type is IE. The major version must be greater than 5.0. The platform must be Windows.
Opera/ Browser type is Opera. The version must be greater than or equal to 7.60.
Mozilla/5.0 ( If the User Agent contains "Safari/", the browser type is Safari. The version number must be greater 119.0.

Otherwise the platform type must be one of Windows, Macintosh, or X11 and the User Agent must contain "Gecko/".

If User Agent also contains "Netscape/", the browser type is Netscape and the version must be greater than 7.0.

Otherwise User Agent must contain "rv:". The browser type is Mozilla and the version must be greater than 1.3. Camino version 5-- plus browsers listed in exclude-list are not supported.

%AddToSaveSet() %DispatchSetModified() %NormalizeObject()
%ClassIsLatestVersion() %DispatchSetMultidimProperty() %ObjectModified()
%ClassName() %DispatchSetProperty() %OriginalNamespace()
%ConstructClone() %Extends() %PackageName()
%DispatchClassMethod() %GetParameter() %RemoveFromSaveSet()
%DispatchGetModified() %IsA() %SerializeObject()
%DispatchGetProperty() %IsModified() %SetModified()
%DispatchMethod() %New() %ValidateObject()