Internet Direct (Indy) Version 9.0.2 Beta
TIdNetscapeCookie.IsValidCookie
Indicates if the Domain for the Cookie matches the host server for the request.

function IsValidCookie(AServerHost: String): Boolean; virtual;
Parameters
AServerHost: String
Host server receiving the request.

Returns
Boolean - True when the host server matches Domain.

Description
IsValidCookie is a Boolean function that indicates if the Domain for the Cookie matches the host server that received the request and state information. AServerHost is the server that received the request containing the persistent state information in the Cookie. IsValidCookie returns True when AServerHost contains an IP address or host name that matches the Domain for the Cookie.

Use Path to determine the subset of URLs where the Cookie is valid.