{"id":151,"date":"2015-04-21T22:50:07","date_gmt":"2015-04-21T22:50:07","guid":{"rendered":"http:\/\/www.danieledavi.com\/blog\/?p=151"},"modified":"2015-04-22T09:49:05","modified_gmt":"2015-04-22T09:49:05","slug":"write-special-characters-in-cookies-with-classic-asp","status":"publish","type":"post","link":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/","title":{"rendered":"Write special characters in cookies with classic ASP"},"content":{"rendered":"<p>The following code line<\/p>\n<pre>Response.Cookies(\"test\")= \"__cf_mob_redir\"<\/pre>\n<p>will produce a cookie named &#8220;test&#8221; whith value &#8220;%5F%5Fcf%5Fmob%5Fredir&#8221;<\/p>\n<p>Perhaps is not what we wanted.<\/p>\n<p>Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take care of reading the expected value.<\/p>\n<p>What to do?<\/p>\n<p>First, is useful to know that encoding the special character _ (underscore) in ASP as <span style=\"color: #ff0000;\">chr(95)<\/span> or as HTML entity <span style=\"color: #ff0000;\">&amp;#95<\/span> will not solve the situation. The same for any other special characters.<\/p>\n<p>Second, is better to underline that not always we want to send an html body as response, since sometimes we want just send headers. In case we want to send a body the following lines are a nice style exercise to write javascript through ASP code.<\/p>\n<pre class=\"default prettyprint prettyprinted\" style=\"color: #393318;\"><code><span class=\"typ\" style=\"color: #2b91af;\">Response<\/span><span class=\"pun\" style=\"color: #000000;\">.<\/span><span class=\"typ\" style=\"color: #2b91af;\">Write<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"str\" style=\"color: #800000;\">\"&lt;script type=\"<\/span><span class=\"pun\" style=\"color: #000000;\">&amp;<\/span><span class=\"pln\" style=\"color: #000000;\">chr<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"lit\" style=\"color: #800000;\">34<\/span><span class=\"pun\" style=\"color: #000000;\">)&amp;<\/span><span class=\"str\" style=\"color: #800000;\">\"text\/javascript\"<\/span><span class=\"pun\" style=\"color: #000000;\">&amp;<\/span><span class=\"pln\" style=\"color: #000000;\">chr<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"lit\" style=\"color: #800000;\">34<\/span><span class=\"pun\" style=\"color: #000000;\">)&amp;<\/span><span class=\"str\" style=\"color: #800000;\">\"&gt;\"<\/span><span class=\"pun\" style=\"color: #000000;\">)<\/span><span class=\"pln\" style=\"color: #000000;\">\r\njjj1 <\/span><span class=\"pun\" style=\"color: #000000;\">=<\/span><span class=\"str\" style=\"color: #800000;\">\"document.cookie=\"<\/span><span class=\"pun\" style=\"color: #000000;\">&amp;<\/span><span class=\"pln\" style=\"color: #000000;\">chr<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"lit\" style=\"color: #800000;\">34<\/span><span class=\"pun\" style=\"color: #000000;\">)&amp;<\/span><span class=\"str\" style=\"color: #800000;\">\"YOURcookiename=__cf_mob_redir\"<\/span><span class=\"pun\" style=\"color: #000000;\">&amp;<\/span><span class=\"pln\" style=\"color: #000000;\">chr<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"lit\" style=\"color: #800000;\">34<\/span><span class=\"pun\" style=\"color: #000000;\">)\r\n<\/span><span class=\"typ\" style=\"color: #2b91af;\">Response<\/span><span class=\"pun\" style=\"color: #000000;\">.<\/span><span class=\"typ\" style=\"color: #2b91af;\">Write<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"pln\" style=\"color: #000000;\">jjj1<\/span><span class=\"pun\" style=\"color: #000000;\">)\r\n<\/span><span class=\"typ\" style=\"color: #2b91af;\">Response<\/span><span class=\"pun\" style=\"color: #000000;\">.<\/span><span class=\"typ\" style=\"color: #2b91af;\">Write<\/span><span class=\"pun\" style=\"color: #000000;\">(<\/span><span class=\"str\" style=\"color: #800000;\">\"&lt;\/script&gt;\"<\/span><span class=\"pun\" style=\"color: #000000;\">)<\/span><\/code><\/pre>\n<p>In this way our cookie variable value will be exactly what we wanted &#8220;__cf_mob_redir&#8221;.<\/p>\n<p>But what if we need absolutely to send only the headers, for example to avoid\u00a0<span style=\"color: #222222;\">the page be returned before being able to set the cookie and send a header response?<\/span><\/p>\n<p>This line is the answer.<\/p>\n<pre class=\"default prettyprint prettyprinted\" style=\"color: #393318;\"><code><span class=\"typ\" style=\"color: #2b91af;\">Response<\/span><span class=\"pun\" style=\"color: #000000;\">.<\/span><span class=\"typ\" style=\"color: #2b91af;\">AddHeader <\/span><span class=\"str\" style=\"color: #800000;\">\"Set-Cookie\"<\/span><span class=\"pun\" style=\"color: #000000;\">, <\/span><span class=\"str\" style=\"color: #800000;\">\"nameKey=__cf_mob_redir; HttpOnly\"<\/span><\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following code line Response.Cookies(&#8220;test&#8221;)= &#8220;__cf_mob_redir&#8221; will produce a cookie named &#8220;test&#8221; whith value &#8220;%5F%5Fcf%5Fmob%5Fredir&#8221; Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":132,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[35,3],"tags":[63,36,64,58,61,60,59,62],"class_list":["post-151","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-classic-asp","category-programming","tag-__cf_mob_redir","tag-asp","tag-cloudflare","tag-cookies","tag-decode","tag-encode","tag-special-characters","tag-underscore"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"The following code line Response.Cookies(&quot;test&quot;)= &quot;__cf_mob_redir&quot; will produce a cookie named &quot;test&quot; whith value &quot;%5F%5Fcf%5Fmob%5Fredir&quot; Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Daniele Dav\u00ec\"\/>\n\t<meta name=\"keywords\" content=\"__cf_mob_redir,asp,cloudflare,cookies,decode,encode,special characters,underscore\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Daniele Davi&#039; | Author, Coach, Executive\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Write special characters in cookies with classic ASP | Daniele Davi&#039;\" \/>\n\t\t<meta property=\"og:description\" content=\"The following code line Response.Cookies(&quot;test&quot;)= &quot;__cf_mob_redir&quot; will produce a cookie named &quot;test&quot; whith value &quot;%5F%5Fcf%5Fmob%5Fredir&quot; Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2015-04-21T22:50:07+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2015-04-22T09:49:05+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@_danieledavi\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Write special characters in cookies with classic ASP | Daniele Davi&#039;\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The following code line Response.Cookies(&quot;test&quot;)= &quot;__cf_mob_redir&quot; will produce a cookie named &quot;test&quot; whith value &quot;%5F%5Fcf%5Fmob%5Fredir&quot; Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@_danieledavi\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#article\",\"name\":\"Write special characters in cookies with classic ASP | Daniele Davi'\",\"headline\":\"Write special characters in cookies with classic ASP\",\"author\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/08\\\/AspClassic.png\",\"width\":300,\"height\":225,\"caption\":\"Classic ASP\"},\"datePublished\":\"2015-04-21T22:50:07+01:00\",\"dateModified\":\"2015-04-22T09:49:05+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#webpage\"},\"articleSection\":\"Classic ASP, Programming, __cf_mob_redir, ASP, CloudFlare, cookies, decode, encode, special characters, underscore\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/classic-asp\\\/#listItem\",\"name\":\"Classic ASP\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/classic-asp\\\/#listItem\",\"position\":3,\"name\":\"Classic ASP\",\"item\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/classic-asp\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#listItem\",\"name\":\"Write special characters in cookies with classic ASP\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#listItem\",\"position\":4,\"name\":\"Write special characters in cookies with classic ASP\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/classic-asp\\\/#listItem\",\"name\":\"Classic ASP\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#person\",\"name\":\"Daniele Davi'\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/_danieledavi\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/daniele-d-93168411\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Daniele Dav\\u00ec\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a724123f14df7848229a1ebf22e4cafabdb50b8aa9fd5540d96f3bb1d7f3f435?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Daniele Dav\\u00ec\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#webpage\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/\",\"name\":\"Write special characters in cookies with classic ASP | Daniele Davi'\",\"description\":\"The following code line Response.Cookies(\\\"test\\\")= \\\"__cf_mob_redir\\\" will produce a cookie named \\\"test\\\" whith value \\\"%5F%5Fcf%5Fmob%5Fredir\\\" Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/08\\\/AspClassic.png\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#mainImage\",\"width\":300,\"height\":225,\"caption\":\"Classic ASP\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2015\\\/04\\\/write-special-characters-in-cookies-with-classic-asp\\\/#mainImage\"},\"datePublished\":\"2015-04-21T22:50:07+01:00\",\"dateModified\":\"2015-04-22T09:49:05+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/\",\"name\":\"Daniele Davi'\",\"description\":\"Author, Coach, Executive\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Write special characters in cookies with classic ASP | Daniele Davi'","description":"The following code line Response.Cookies(\"test\")= \"__cf_mob_redir\" will produce a cookie named \"test\" whith value \"%5F%5Fcf%5Fmob%5Fredir\" Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take","canonical_url":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/","robots":"max-image-preview:large","keywords":"__cf_mob_redir,asp,cloudflare,cookies,decode,encode,special characters,underscore","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#article","name":"Write special characters in cookies with classic ASP | Daniele Davi'","headline":"Write special characters in cookies with classic ASP","author":{"@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.danieledavi.com\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/08\/AspClassic.png","width":300,"height":225,"caption":"Classic ASP"},"datePublished":"2015-04-21T22:50:07+01:00","dateModified":"2015-04-22T09:49:05+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#webpage"},"isPartOf":{"@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#webpage"},"articleSection":"Classic ASP, Programming, __cf_mob_redir, ASP, CloudFlare, cookies, decode, encode, special characters, underscore"},{"@type":"BreadcrumbList","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.danieledavi.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/classic-asp\/#listItem","name":"Classic ASP"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/classic-asp\/#listItem","position":3,"name":"Classic ASP","item":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/classic-asp\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#listItem","name":"Write special characters in cookies with classic ASP"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#listItem","position":4,"name":"Write special characters in cookies with classic ASP","previousItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/classic-asp\/#listItem","name":"Classic ASP"}}]},{"@type":"Person","@id":"https:\/\/www.danieledavi.com\/blog\/#person","name":"Daniele Davi'","sameAs":["https:\/\/twitter.com\/_danieledavi","https:\/\/www.linkedin.com\/in\/daniele-d-93168411\/"]},{"@type":"Person","@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author","url":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/","name":"Daniele Dav\u00ec","image":{"@type":"ImageObject","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a724123f14df7848229a1ebf22e4cafabdb50b8aa9fd5540d96f3bb1d7f3f435?s=96&d=mm&r=g","width":96,"height":96,"caption":"Daniele Dav\u00ec"}},{"@type":"WebPage","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#webpage","url":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/","name":"Write special characters in cookies with classic ASP | Daniele Davi'","description":"The following code line Response.Cookies(\"test\")= \"__cf_mob_redir\" will produce a cookie named \"test\" whith value \"%5F%5Fcf%5Fmob%5Fredir\" Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.danieledavi.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#breadcrumblist"},"author":{"@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/08\/AspClassic.png","@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#mainImage","width":300,"height":225,"caption":"Classic ASP"},"primaryImageOfPage":{"@id":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/#mainImage"},"datePublished":"2015-04-21T22:50:07+01:00","dateModified":"2015-04-22T09:49:05+01:00"},{"@type":"WebSite","@id":"https:\/\/www.danieledavi.com\/blog\/#website","url":"https:\/\/www.danieledavi.com\/blog\/","name":"Daniele Davi'","description":"Author, Coach, Executive","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.danieledavi.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Daniele Davi' | Author, Coach, Executive","og:type":"article","og:title":"Write special characters in cookies with classic ASP | Daniele Davi'","og:description":"The following code line Response.Cookies(&quot;test&quot;)= &quot;__cf_mob_redir&quot; will produce a cookie named &quot;test&quot; whith value &quot;%5F%5Fcf%5Fmob%5Fredir&quot; Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take","og:url":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/","article:published_time":"2015-04-21T22:50:07+00:00","article:modified_time":"2015-04-22T09:49:05+00:00","twitter:card":"summary_large_image","twitter:site":"@_danieledavi","twitter:title":"Write special characters in cookies with classic ASP | Daniele Davi'","twitter:description":"The following code line Response.Cookies(&quot;test&quot;)= &quot;__cf_mob_redir&quot; will produce a cookie named &quot;test&quot; whith value &quot;%5F%5Fcf%5Fmob%5Fredir&quot; Perhaps is not what we wanted. Even if we could decode the result when reading the cookie that string is very ugly. Could also happen that our responsibility is limited to write the right value and someone else will take","twitter:creator":"@_danieledavi"},"aioseo_meta_data":{"post_id":"151","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2023-12-01 12:21:06","updated":"2026-08-10 00:21:17","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.danieledavi.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.danieledavi.com\/blog\/category\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.danieledavi.com\/blog\/category\/programming\/classic-asp\/\" title=\"Classic ASP\">Classic ASP<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tWrite special characters in cookies with classic ASP\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.danieledavi.com\/blog"},{"label":"Programming","link":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/"},{"label":"Classic ASP","link":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/classic-asp\/"},{"label":"Write special characters in cookies with classic ASP","link":"https:\/\/www.danieledavi.com\/blog\/2015\/04\/write-special-characters-in-cookies-with-classic-asp\/"}],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p90hsv-2r","jetpack-related-posts":[],"amp_enabled":true,"jetpack_featured_media_url":"https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/08\/AspClassic.png","_links":{"self":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/comments?post=151"}],"version-history":[{"count":4,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts\/151\/revisions"}],"predecessor-version":[{"id":156,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts\/151\/revisions\/156"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/media\/132"}],"wp:attachment":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/media?parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/categories?post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/tags?post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}