@SetHTTPHeader (Formula Language)

In a Web application, sets the value of HTTP headers in the response being generated by the server for the browser client.

Note: This function is new with Release 6.


@SetHTTPHeader( responseHeader ; value )



String. The name of a response-header field, for example, "Content-Encoding," "Content-Length," or "Set-Cookie." See http:/www.w3.org/Protocols for specifications of response headers. The following response headers are read-only and cannot be set or overwritten using this function:

  • Connection
  • Content-Type
  • Date
  • Server


Text, number, or date. A value for the field. Dates are converted to RFC 1123 format. An empty string ("") removes the header and its value from the HTTP response.

Return value


Number. @True, or one (1), if the HTTP response header was successfully updated; @False, or zero (0), otherwise.


@SetHTTPHeader is useful in formulas that run in the context of a browser; the Notes® client always returns @False, or zero (0), for this formula.

See @GetHTTPHeader for information on getting a request header value.


This form action sets the value of the response-header field named "Set-Cookie" to "SHOP_CART_ID=4646." As a result, the browser client registers a cookie for the server using this name and value.
@SetHTTPHeader("Set-Cookie"; "SHOP_CART_ID=4646")

This function appends the Set-Cookie response header to the end of the following standard HTTP response:

HTTP/1.0 200 OK
Date: Thurs, 30 Aug 2001 16:17:52 GMT
Server: Domino/6.0
Content-type: text/html
Content-length: 1538
Last-modified: Mon, 27 Aug 2001 01:23:50 GMT
Set-Cookie: SHOP_CART_ID=4646