Fan

 

class

web::UserAgent

sys::Obj
  web::UserAgent

UserAgent identifies a user agent.

Slots

fromStrSource

new fromStr(Str userAgentStr)

Construct a new UserAgent with this user agent string.

isFirefoxSource

readonly Bool isFirefox := false

Is this user agent Mozilla Firefox.

isIESource

readonly Bool isIE := false

Is this user agent Microsoft Internet Explorer.

isOperaSource

readonly Bool isOpera := false

Is this agent Opera.

isSafariSource

readonly Bool isSafari := false

Is this agent Apple Safari.

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Return a string representation of this object. The result of this method will match the original Str that was used to parse this UserAgent.

tokensSource

readonly Str[] tokens := Str[,]

The tokens identifying this user agent in the order they were parsed. This list is readonly.

versionSource

readonly Version version

The primary version for this user agent. This field is only valid if the user agent is IE, Firefox, Safari, or Opera. For all other browsers, or if the above list has an invalid version string, this field will default to "0.0".