%CSP.UserAgent
Class %CSP.UserAgent Extends %RegisteredObject [ System = 4 ]
Determine browser parameters from HTTP_USER_AGENT CGI variable.
Properties
UserAgent
Property UserAgent As %String;
User agent for this class.
SupportsXMLHttpRequest
Property SupportsXMLHttpRequest As %Boolean;
Supports XMLHttpRequest.
Browser
Property Browser As %String;
Browser name
Platform
Property Platform As %String;
Browser platform
Version
Property Version As %String;
Browser version
Methods
%OnNew
Method %OnNew(userAgent As %String) As %Status
Initialize with HTTP_USER_AGENT.
UserAgentSet
Method UserAgentSet(value As %String) As %Status [ Internal ]
Set method for UserAgent property
XMLHttpRequest
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:
| 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/". 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. | | ------ | ------------------------------------------------------------------------- | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
GetVersion
ClassMethod GetVersion(version As %String, pos As %Integer, ByRef major As %String, ByRef minor As %String) [ Internal ]
Extract version information from specified start position as major.minor