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.
charset
lets 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 unlessfile
orreset
is 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
file
attribute. Optional. The default isNo
.-
file="
filename
"
The name of the file being sent to the browser. Required unless
type
orreset
is specified.-
reset="Yes|No"
Whether or not to suppress any output preceding the call to the
cfcontent
tag. Thereset
attribute is ignored if a value is specified forfile
ortype
. The default isYes
.
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.