Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpCookie.Domain | domain property

Applies to Windows and Windows Phone

Get the domain for which the HttpCookie is valid.

Syntax


var domain = httpCookie.domain;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http
Windows::Web::Http [C++]

Metadata

Windows.winmd

See also

HttpCookie

 

 

Show:
© 2014 Microsoft