%CSP.Response
The %CSP.ResponseOpens in a new tab class supports a number of properties and methods. Here are descriptions of a few of them:
Property or Method | Description |
---|---|
Redirect |
Set the value of this property to a target URL. This causes an HTTP redirect code to be returned to the browser. The browser then requests the page specified by the URL. |
ServerSideRedirect |
Set the value of this property to a target URL. The URL should not contain the server name. For example, it should be something like: /csp/user/Contact.csp. Redirection using ServerSideRedirect takes place entirely on the CSP server. Since it involves one less round trip to the client, using ServerSideRedirect to redirect is faster than using Redirect. One potential drawback to using ServerSideRedirect is that the URL displayed in the client browser will be the URL for the originally requested page and not the page that the client has been redirected to. This might be confusing to the user. |
ContentType |
Sets the content type for the response. The default value is text/html. |
Cookies | The array of cookies to be sent in the response. |
SetCookie |
Sets a cookie into the reply. |
Since it affects the HTTP headers, manipulate the %response variable in the onPreHTTP method.
For more information on %CSP.ResponseOpens in a new tab, read the Caché class documentation as well as the discussion of “The %CSP.Response Object” in the HTTP Requests section of Using Caché Server Pages.
For more information on using Cookies, read the “Storing Data in Cookies” in the Session Management section of Using Caché Server Pages.