Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%CSP] >  [UserAgent]
Private  Storage   

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
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnNew %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject 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 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:

Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.
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.