Tags · Functions · Objects
Lucee Tag Reference
Choose a tag:

Tag <CFHEADER>

Generates custom HTTP response headers to return to the client.

Body

This tag can't have a body.

Example

	<cfheader
		[charset="string"]
		[name="string"]
		[statuscode="number"]
		[statustext="string"]
		[value="string"]>
	
This tag is also supported within cfscript
	<cfscript>
		header
		[charset="string"]
		[name="string"]
		[statuscode="number"]
		[statustext="string"]
		[value="string"];
	</cfscript>

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
charset string No The character encoding in which to encode the header value.

For more information on character encodings, see:
www.w3.org/International/O-charset.html. 
name string No A name for the header. 
statuscode number No A number that sets the HTTP status code. 
statustext string No Text that explains the status code. This attribute is used in conjunction with the
statusCode attribute. 
value string No A value for the HTTP header. This attribute is used in conjunction with the name attribute.