Jaa


HttpCookie.Domain Property

Definition

Get the domain for which the HttpCookie is valid.

public:
 property Platform::String ^ Domain { Platform::String ^ get(); };
winrt::hstring Domain();
public string Domain { get; }
var string = httpCookie.domain;
Public ReadOnly Property Domain As String

Property Value

String

Platform::String

winrt::hstring

The domain for which the HttpCookie is valid.

Remarks

The Domain property specifies those hosts to which the cookie will be sent.

A cookie with a Domain property of .contoso.com will be sent to the contoso.com domain and all subdomains (www.contoso.com and info.contoso.com, for example).

A cookie with a Domain property of info.contoso.com will not be sent to contoso.com or www.contoso.com, but will be sent to info.contoso.com and all subdomains (uk.info.contoso.com and us.info.contoso.com, for example).

The default value for the Domain property is the host name that this cookie was received from.

Applies to