Name
cfcontent
Synopsis
<cfcontent>
Sends content of the
specified media type to the browser. Content may be dynamically
generated by ColdFusion or come from a file. The
cfcontent tag is often used to send files stored
above the web root directory to the browser or to generate non-HTML
content for other clients, such as wireless devices (cell phones,
PDAs, etc.).
Attributes
-
type="MIME_type_and_or_charset" The MIME type and/or character set for the content to be sent to the browser.
charsetlets you specify a Java character set to use for the encoding. The most common character sets areUTF-8(the default),UTF-16,UTF-16BE,UTF-16LE,US-ASCII, andISO-8859-1. You may use any character set supported by your JRE. If you want to specify a MIME type and a character set, delimit them with a space or a semicolon:type="text/html;charset=utf-8". Required unlessfileorresetis specified.-
deletefile="Yes|No" Whether or not to delete the file after it has been sent to the browser. Valid only if a file was specified in the
fileattribute. Optional. The default isNo.-
file="filename" The name of the file being sent to the browser. Required unless
typeorresetis specified.-
reset="Yes|No" Whether or not to suppress any output preceding the call to the
cfcontenttag. Theresetattribute is ignored if a value is specified forfileortype. The default isYes.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access