Shareable Property

HttpCookie.Shareable Property

.NET Framework (current version)
 

Determines whether the cookie is allowed to participate in output caching.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public bool Shareable { get; set; }

Property Value

Type: System.Boolean

true to specify that output caching will not be suppressed for a give HttpResponse containing one or more outbound cookies; otherwise, false.

If a given HttpResponse contains one or more outbound cookies with Shareable is set to false (the default value), output caching will be suppressed for the response. This prevents cookies that contain potentially sensitive information from being cached in the response and sent to multiple clients. To allow a response containing cookies to be cached, configure caching normally for the response, such as using the OutputCache directive or MVC's [OutputCache] attribute, and set all outbound cookies to have Shareable set to true.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft