Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

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 are UTF-8 (the default), UTF-16, UTF-16BE, UTF-16LE, US-ASCII, and ISO-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 unless file or reset 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 is No.

file=" filename "

The name of the file being sent to the browser. Required unless type or reset is specified.

reset="Yes|No"

Whether or not to suppress any output preceding the call to the cfcontent tag. The reset attribute is ignored if a value is specified for file or type. The default is Yes.

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.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page