HttpCookie.Shareable Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈