Bunoon: TESS | Manual | Browser

This area contains a set of functions that are used for getting nearly every piece of information you would need to know about the web browser the user is using. Everything from the browser name, version, platform and additional settings, is made available in easy-to-call function methods.

Also available in this area is easy-to-use cookie writing and reading functions, that will allow you to store information that the user has entered so that it can be re-used the next time they return to your web site/application. For all UK/EU residents, please be aware of the following new laws before using this section.

Get the user agent string being used by the browser.

The return value for this function is as follows:

  • [String] - A string containing the user agent.

Below is an example of how to use this function:

var sDetails = $T.Browser.GetAgent();

Get the platform the browser is being used in.

The return value for this function is as follows:

  • [String] - A string containing the platform.

Below is an example of how to use this function:

var sDetails = $T.Browser.GetPlatform();

Get the name of the browser currently being used.

The main arguments for this function are as follows:

  • bGetLongName [Boolean] - States if we should get the long name of the browser (defaults to false).

The return value for this function is as follows:

  • [Object] - A string containing the browser name (or null if any error has occurred).

Below is an example of how to use this function:

var sDetails = $T.Browser.GetName(false);

Get the version of the browser currently being used.

The return value for this function is as follows:

  • [Object] - A string containing the browser version (or null if any error has occurred).

Below is an example of how to use this function:

var sDetails = $T.Browser.GetVersion();

Determines if cookies are enabled in the browser or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bDetails = $T.Browser.IsCookiesEnabled();

Determines if the browser being used is MSIE or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bDetails = $T.Browser.IsMSIE();

Determines if the browser being used is FireFox or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bDetails = $T.Browser.IsFireFox();

Determines if the browser being used is Chrome or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bDetails = $T.Browser.IsChrome();

Determines if the browser being used is Safari or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bDetails = $T.Browser.IsSafari();

Determines if the browser being used is Opera or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bDetails = $T.Browser.IsOpera();

Looks up a cookie by name and reads the value assigned to it.

The main arguments for this function are as follows:

  • sSetting [String] - The setting we should be looking up.

The return value for this function is as follows:

  • [Object] - A string containing the setting value (or null if any error has occurred).

Below is an example of how to use this function:

var sDetails = $T.Browser.Cookie.Read('Name');

Tries to write a cookie by setting name and value (with additional support to state when the cookie will expire).

The main arguments for this function are as follows:

  • sSetting [String] - The setting name we should use.
  • sValue [String] - The value we should save.
  • nDaysToExpire [Number] - States the number of days from now the cookie should expire.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false to state of we have completed the operation.

Below is an example of how to use this function:

var sDetails = $T.Browser.Cookie.Write('Name', 'John', 1);

Looks up a cookie by setting name and tries to delete it.

The main arguments for this function are as follows:

  • sSetting [String] - The setting we should be looking up.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false to state of we have completed the operation.

Below is an example of how to use this function:

var sDetails = $T.Browser.Cookie.Delete('Name');

Looks up a cookie by setting name to determine if it exists.

The main arguments for this function are as follows:

  • sSetting [String] - The setting we should be looking up.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var sDetails = $T.Browser.Cookie.Exists('Name');