Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %CSP.UserAgent
Private  Storage   

%CSP.UserAgent


class %CSP.UserAgent extends
%RegisteredObject

Determine browser parameters from HTTP_USER_AGENT CGI variable.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 4


Summary


Properties
Browser Platform SupportsXMLHttpRequest UserAgent
Version

Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject GetVersion UserAgentSet
XMLHttpRequest


Properties


• property Browser as %String;
Browser name
• property Platform as %String;
Browser platform
• property SupportsXMLHttpRequest as %Boolean;
Supports XMLHttpRequest.
• property UserAgent as %String;
User agent for this class.
• property Version as %String;
Browser version

Methods


• method %OnNew(userAgent As %String) as %Status
Initialize with HTTP_USER_AGENT.
• classmethod GetVersion(version As %String, pos As %Integer, ByRef major As %String, ByRef minor As %String)
Extract version information from specified start position as major.minor
• method UserAgentSet(value As %String) as %Status
Set method for UserAgent property
• classmethod XMLHttpRequest(userAgent As %String, ByRef browser As %String, ByRef platform As %String, ByRef version As %String) as %Boolean
XMLHttpRequest returns true if XMLHttpRequest object is supported by the browser indicated by the userAgent. Current implementation parses User Agents beginning with:
© 2020 InterSystems Corporation, Cambridge, MA. All rights reserved.
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.