CCookie::getSecure

The CCookie::getSecure function retrieves the Secure attribute of the cookie.

bool getSecure();


Return Type

bool
A boolean value which contains the Secure attribute of the cookie is returned.


Parameters

None.


Remarks

This function retrieves the Secure attribute of the cookie. It indicates to the browser whether the cookie should only be sent using a secure protocol, such as HTTPS or SSL.

The default value of Secure attribute is false and the cookie is sent from the browser to the server using any protocol. If the value of Secure attribute is set to true, sent on only a secure protocol.

The CCookie::setSecure function can be used to set the Secure attribute of the cookie.


See Also

CCookie, CCookie::setSecure, CResponse::addCookie, CRequest::getCookies, CRequest::getCookie

Example