The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

HTTP::Promise::Headers::ClearSiteData - Clear-Site-Data Header Field

SYNOPSIS

    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('*');

VERSION

    v0.1.0

DESCRIPTION

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.

Example:

    Clear-Site-Data: "cache", "cookies", "storage", "executionContexts"

METHODS

cache

Sets or gets the property 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.

cookies

Sets or gets the property 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.

execution_contexts

Sets or gets the property executionContexts

Indicates that the server wishes to reload all browsing contexts for the origin of the response (Location.reload).

params

Returns the array object used by this header field object containing all the properties set.

properties

Returns the hash object used as a repository of properties.

storage

Sets or gets the property storage

Indicates that the server wishes to remove all DOM storage for the origin of the response URL.

wildcard

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.

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

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 & LICENSE

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.