You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

set_response_header()

Usage

set_response_header(name, value)

Description
Sets the value of the HTTP response header with the given name to the given value. This method can be used to set and/or override HTTP response headers in the Structr server implementation to control certain aspects of browser / client behaviour.

The following example will cause the browser to display a “Save as…” dialog when visiting the page, because the response content type is set to text/csv.

Example

${set_response_header('Content-Type', 'text/csv')}

Search results for "set_response_header()"

set_response_header()

Sets the value of the HTTP response header with the given name to the given value. This method can be used to set and/or override HTTP response headers in the Structr server implementation to control certain aspects of browser / client behaviour.

set_response_header(name, value)
set_response_header(name, value [, override]) // New in v.3.6