CFHEADER

CFHEADER generates custom HTTP response headers to return to the client.

Syntax

<CFHEADER
    NAME="header_name"
    VALUE="header_value">
or
<CFHEADER
    STATUSCODE="status_code"
    STATUSTEXT="status_text">
NAME

Required if you do not specify the STATUSCODE attribute. A name for the header.

VALUE

Optional. A value for the HTTP header. This attribute is used in conjunction with the NAME attribute.

STATUSCODE

Required if you do not specify the NAME attribute. A number that sets the HTTP status code.

STATUSTEXT

Optional. Text that explains the status code. This attribute is used in conjunction with the STATUSCODE attribute.

Example

cfheader

 <!--- This example shows the use of CFHEADER ---> <HTML> <HEAD> <TITLE>CFHEADER Example</TITLE> </HEAD> ...

Get Sams Teach Yourself ColdFusion® in 21 Days 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.