Windows Dev Center

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.Expires | expires property

Get or set the expiration date and time for the HttpCookie.

Syntax


var expires = httpCookie.expires;
httpCookie.expires = expires;

Property value

Type: IReference<DateTime> [JavaScript/C++] | System.Nullable<DateTime> [.NET]

The expiration date and time for the HttpCookie.

Remarks

Setting the Expires property to null makes this a Cookie that is only good for the current HTTP session and will not be persisted. Setting the Expires property to a date in the past deletes the Cookie.

The default value for the Expires property is null.

Javascript and .NET languages do not use DateTime directly. In Javascript a DateTime is projected as a Date object, and in .NET it is projected as a System.DateTimeOffset structure. In C++, the DateTime.UniversalTime member has the same granularity as a FILETIME and supports the date ranges required by Javascript and .NET.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

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

DateTime
HttpCookie

 

 

Show:
© 2015 Microsoft