Instance Property

isHTTPOnly

A Boolean value that indicates whether the cookie should only be sent to HTTP servers.

Declaration

var isHTTPOnly: Bool { get }

Discussion

The value of this property is true if the cookie should only be sent using HTTP headers, false otherwise.

Cookies can be marked as HTTP-only by a server (or by JavaScript code). Cookies marked as such must only be sent via HTTP Headers in HTTP requests for URLs that match both the path and domain of the respective cookies.

See Also

Securing Cookies

var isSecure: Bool

A Boolean value that indicates whether this cookie should only be sent over secure channels.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software