Rediger

Del via


HttpCookie.Shareable Property

Definition

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

public:
 property bool Shareable { bool get(); void set(bool value); };
public bool Shareable { get; set; }
member this.Shareable : bool with get, set
Public Property Shareable As Boolean

Property Value

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

Remarks

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.

Applies to