Set MIME type (with charset)
Sets the MIME type and character set in the HTTP response header.
It takes two parameters:
- The MIME type.
This should start with "text/" since character set isn't used outside of text types. - The character set.
Despite the parameter saying the character set is UTF-8 by default, using "" as the second parameter will result in the Content-Type not specifying a character set at all. This default refers to when you don't set a MIME type via action at all.
This action will set the Content-Type response header, which is normally:
Content-Type: text/html; charset=UTF-8
Using the action, you can not just specify that it is a text-based type, but also the character set, like:
Content-Type: text/html; charset=ISO-8859-1
The character set is covered some under Unicode notes. ISO-8859-1 is used by most English Windows versions as their ANSI charset.
Note that Webserver will not convert any strings you add via an On request > Add to response > String action. It will add the string as the ANSI format that the Webserver's OS is set to.