HTTP::Promise::Headers::ClearSiteData - Clear-Site-Data Header Field
use HTTP::Promise::Headers::ClearSiteData; my $csd = HTTP::Promise::Headers::ClearSiteData->new || die( HTTP::Promise::Headers::ClearSiteData->error, "\n" ); my $h = HTTP::Promise::Headers::ClearSiteData->new; # Single directive # Clear-Site-Data: "cache" $h->cache(1); # Multiple directives (comma separated) # Clear-Site-Data: "cache", "cookies" $h->cache(1); $h->cookies(1); # Wild card # Clear-Site-Data: "*" $h->params('*');
v0.1.0
The following is an extract from Mozilla documentation.
The Clear-Site-Data header clears browsing data (cookies, storage, cache) associated with the requesting website. It allows web developers to have more control over the data stored by a client browser for their origins.
Clear-Site-Data
Example:
Clear-Site-Data: "cache", "cookies", "storage", "executionContexts"
Sets or gets the property cache
cache
Indicates that the server wishes to remove locally cached data (the browser cache, see HTTP caching) for the origin of the response URL. Depending on the browser, this might also clear out things like pre-rendered pages, script caches, WebGL shader caches, or address bar suggestions.
Sets or gets the property cookies
cookies
Indicates that the server wishes to remove all cookies for the origin of the response URL. HTTP authentication credentials are also cleared out. This affects the entire registered domain, including subdomains. So https://example.com as well as https://stage.example.com, will have cookies cleared.
Sets or gets the property executionContexts
executionContexts
Indicates that the server wishes to reload all browsing contexts for the origin of the response (Location.reload).
Returns the array object used by this header field object containing all the properties set.
Returns the hash object used as a repository of properties.
Sets or gets the property storage
storage
Indicates that the server wishes to remove all DOM storage for the origin of the response URL.
Sets or gets the special property * (wildcard)
*
Indicates that the server wishes to clear all types of data for the origin of the response. If more data types are added in future versions of this header, they will also be covered by it.
Jacques Deguest <jack@deguest.jp>
Mozilla documentation
HTTP::Promise, HTTP::Promise::Request, HTTP::Promise::Response, HTTP::Promise::Message, HTTP::Promise::Entity, HTTP::Promise::Headers, HTTP::Promise::Body, HTTP::Promise::Body::Form, HTTP::Promise::Body::Form::Data, HTTP::Promise::Body::Form::Field, HTTP::Promise::Status, HTTP::Promise::MIME, HTTP::Promise::Parser, HTTP::Promise::IO, HTTP::Promise::Stream, HTTP::Promise::Exception
Copyright(c) 2022 DEGUEST Pte. Ltd.
All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTTP::Promise, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Promise
CPAN shell
perl -MCPAN -e shell install HTTP::Promise
For more information on module installation, please visit the detailed CPAN module installation guide.