cfflush
149
cfflush
Description
Flushes currently available data to the client.
Category
Data output tags
,
Page processing tags
Syntax
<cfflush
interval = "integer number of bytes">
See also
cfcache
,
cfheader
,
cfinclude
,
cfsetting
,
cfsilent
Attributes
Usage
The first occurrence of this tag on a page sends back the HTML headers and any other available
HTML. Subsequent
cfflush
tags on the page send only the output that was generated after the
previous flush.
When you flush data, ensure that enough information is available, as some browsers might not
respond if you flush only a small amount. Similarly, set the
interval
attribute for a few hundred
bytes or more, but not thousands of bytes.
Use the
interval
attribute only when a large amount of output will be sent to the client, such as
in a
cfloop
or a
cfoutput
of a large query. Using this form globally (such as in the
Application.cfm file) might cause unexpected errors when CFML tags that modify HTML
headers are executed.
Caution:
Because the
cfflush
tag sends data to the browser when it executes, it has several
limitations, including the following: Using any of the following tags or functions on a page anywhere
after the
cfflush
tag can cause errors or unexpected results:
cfcontent
,
cfcookie
,
cfform
,
cfheader
,
cfhtmlhead
,
cflocation
, and
SetLocale
. (These tags and functions normally modify the HTML
header, but cannot do so after a
cfflush
tag, because the
cfflush
sends the header.) Using the
cfset
tag to set a cookie anywhere on a page that has a
cfflush
tag does not set the cookie in the browser.
Using the
cfflush
tag within the body of several tags, including
cfsavecontent
,
cfquery
, and custom
tags, cause errors. If you save Client variables as cookies, any client variables that you set after a
cfflush
tag are not saved in the browser.
Note:
Normally, the
cferror
tag discards the current output buffer and replaces it with the contents of
the error page. The
cfflush
tag discards the current buffer. As a result, the
Error.GeneratedContent
variable resulting from a
cferror
tag after a
cfflush
contains any contents of the output buffer that
has not been flushed. This content is not sent to the client. The content of the error page displays to
the client after the bytes that have been sent.
Attribute
Req/Opt
Default
Description
interval
Optional
Integer.
Flushes output each time this number of bytes becomes
available. HTML headers, and data that is already available
when the tag is executed, are omitted from the count.
Summary of Contents for COLFUSION MX 7 - INSTALLING AND USING COLDFUSION MX
Page 1: ...COLDFUSION MX7 CFML Reference...
Page 20: ...20 Chapter 1 Reserved Words and Variables...
Page 50: ...50 Chapter 2 ColdFusion Tags cfelse br Searching cfif cfloop cfif...
Page 101: ...cfdefaultcase 101 cfdefaultcase cfswitch cfoutput Your grade is grade cfoutput...
Page 115: ...cfdocumentsection 115 cfdocumentsection cfoutput cfdocument...
Page 411: ...cftable 411 cftable body html...
Page 515: ...Chr 515 maxlength 5 p input type Submit name input type RESET cfform...
Page 605: ...GetEncoding 605 WriteOutput The encoding is theEncoding cfscript cfif...
Page 629: ...GetProfileString 629 tr td input type Submit name Submit value Submit td td td tr table form...
Page 655: ...IIf 655 cfoutput IIf Hour Now GTE 12 DE It is afternoon or evening DE It is morning cfoutput b...
Page 664: ...664 Chapter 3 ColdFusion Functions cfelse h3 Conversion error h3 cfif...
Page 687: ...IsStruct 687 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 751: ...LSDateFormat 751 hr noshade cfoutput cfloop...
Page 861: ...StructFind 861 cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 903: ...Val 903 value Is the beginning numeric name form...
Page 932: ...932 Chapter 3 ColdFusion Functions...
Page 944: ...944 Chapter 4 ColdFusion MX Flash Form Style Reference...
Page 962: ...962 Chapter 5 Application CFC Reference...
Page 1054: ...1054 Chapter 6 ColdFusion MX Event Gateway Reference...