{"id":31532,"date":"2018-04-21T15:47:48","date_gmt":"2018-04-21T15:47:48","guid":{"rendered":"https:\/\/ampscript.guide\/ischtmlbrowser\/"},"modified":"2021-04-06T00:58:42","modified_gmt":"2021-04-06T00:58:42","slug":"ischtmlbrowser","status":"publish","type":"post","link":"https:\/\/ampscript.guide\/ischtmlbrowser\/","title":{"rendered":"IsCHTMLBrowser"},"content":{"rendered":"<h2>IsCHTMLBrowser<\/h2>\n<p>This function checks whether a given user agent value is a C-HTML browser.<\/p>\n<p>C-HTML, or Compact HTML, is a subset of the HTML markup language that was developed for small information devices, such as first-generation smart phones and PDAs. The language does not support tables, image maps, multiple fonts or styling of fonts, background colors or images, frames, or style sheets, and is limited to a monochromatic display. This standard was superseded in early 2000 by other markup languages, due to advancements in mobile technology.<\/p>\n<p>This function is only available in landing pages, microsites and CloudPages. It cannot be used in other Marketing Cloud applications.<\/p>\n<h3>Argument<\/h3>\n<p><code>IsCHTMLBrowser(1)<\/code><\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center\">Ordinal<\/th>\n<th style=\"text-align: left\">Type<\/th>\n<th style=\"text-align: left\">Required<\/th>\n<th style=\"text-align: left\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center\">1<\/td>\n<td style=\"text-align: left\">String<\/td>\n<td style=\"text-align: left\">True<\/td>\n<td style=\"text-align: left\">HTTP user-agent header<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The function will return a Boolean value, either <code>true<\/code> or <code>false<\/code>.<\/p>\n<h3>Example<\/h3>\n<p>The following example uses the <code>HTTPRequestHeader<\/code> function to retrieve the <code>user-agent<\/code> HTTP header as an argument to the IsCHTMLBrowser function.<\/p>\n<pre><code>%%[\n\nvar @chtmlBrowser\n\nif IsCHTMLBrowser(HTTPRequestHeader(\"user-agent\")) then\n   set @chtmlBrowser = true\nendif\n\n]%%\nYou %%=Iif(@chtmlBrowser==true,\"are\",\"are not\")=%% using a C-HTML browser<\/code><\/pre>\n<h4>Output<\/h4>\n<p>The following output will be returned when viewing the web page on an Android or iOS device.<\/p>\n<pre><code>You are not using a C-HTML browser<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>IsCHTMLBrowser This function checks whether a given user agent value is a C-HTML browser. C-HTML, or Compact HTML, is a subset of the HTML markup language that was developed for small information devices, such as first-generation smart phones and PDAs. The language does not support tables, image maps, multiple fonts or styling of fonts, background [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v14.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The AMPscript Guide - IsCHTMLBrowser<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ampscript.guide\/ischtmlbrowser\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The AMPscript Guide - IsCHTMLBrowser\" \/>\n<meta property=\"og:description\" content=\"IsCHTMLBrowser This function checks whether a given user agent value is a C-HTML browser. C-HTML, or Compact HTML, is a subset of the HTML markup language that was developed for small information devices, such as first-generation smart phones and PDAs. The language does not support tables, image maps, multiple fonts or styling of fonts, background [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ampscript.guide\/ischtmlbrowser\/\" \/>\n<meta property=\"og:site_name\" content=\"The AMPscript Guide\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-21T15:47:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-06T00:58:42+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ampscript.guide\/#website\",\"url\":\"https:\/\/ampscript.guide\/\",\"name\":\"The AMPscript Guide\",\"description\":\"The Definitive Scripting Manual for Salesforce Marketing Cloud\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ampscript.guide\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ampscript.guide\/ischtmlbrowser\/#webpage\",\"url\":\"https:\/\/ampscript.guide\/ischtmlbrowser\/\",\"name\":\"The AMPscript Guide - IsCHTMLBrowser\",\"isPartOf\":{\"@id\":\"https:\/\/ampscript.guide\/#website\"},\"datePublished\":\"2018-04-21T15:47:48+00:00\",\"dateModified\":\"2021-04-06T00:58:42+00:00\",\"author\":{\"@id\":\"https:\/\/ampscript.guide\/#\/schema\/person\/5335042f77731e84f9808aecef25daec\"},\"breadcrumb\":{\"@id\":\"https:\/\/ampscript.guide\/ischtmlbrowser\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ampscript.guide\/ischtmlbrowser\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ampscript.guide\/ischtmlbrowser\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ampscript.guide\/\",\"url\":\"https:\/\/ampscript.guide\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ampscript.guide\/ischtmlbrowser\/\",\"url\":\"https:\/\/ampscript.guide\/ischtmlbrowser\/\",\"name\":\"IsCHTMLBrowser\"}}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/ampscript.guide\/#\/schema\/person\/5335042f77731e84f9808aecef25daec\",\"name\":\"dev\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/posts\/31532"}],"collection":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/comments?post=31532"}],"version-history":[{"count":0,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/posts\/31532\/revisions"}],"wp:attachment":[{"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/media?parent=31532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/categories?post=31532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ampscript.guide\/wp-json\/wp\/v2\/tags?post=31532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}