IsChtmlBrowser()

Returns a value that indicates if a device's user agent is a CHTML browser.

CHTML or Compact HTML is a variant of HTML that was designed for use on non-smart feature phones, and on early smartphones and PDAs. It was intended to display information on smaller screens with fewer resources. This function was intended for use with landing pages to determine whether to display standard HTML content or CHTML content.

The CHTML standard was superseded in the early 2000s and is now rarely used. This documentation is maintained for historical purposes.

The IsChtmlBrowser() function has one parameter:

  • userAgentHeader (string): Required. An HTTP user-agent header string.

To use the function, pass it an HTTP user-agent header string. This example checks to see if a pre-defined string supports CHTML.

The function returns false because the user agent corresponds to a modern desktop web browser.

You can combine this function with other AMPscript functions. This example uses the HttpRequestHeader() function to return the browser user-agent value from the current browser.

The function returns the appropriate value for the provided user-agent value.