HttpCookie.HttpOnly 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.
Get or set a value that controls whether a script or other active content can access this HttpCookie.
public:
property bool HttpOnly { bool get(); void set(bool value); };
bool HttpOnly();
void HttpOnly(bool value);
public bool HttpOnly { get; set; }
var boolean = httpCookie.httpOnly;
httpCookie.httpOnly = boolean;
Public Property HttpOnly As Boolean
Property Value
bool
Whether a script or other active content can access this HttpCookie.
true if a script or other active content cannot access this HTTP cookie; otherwise, false. The default is false.
Remarks
When this property is set to true, a script or other active content cannot access this HTTP cookie.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for