Firefo...:Cache(3pm)
π Firefo...:Cache(3pm) β the girlies' guide to Firefox cache constants π
okay so bestie, you clicked on the manual page for Firefox::Marionette::Cache (that's the 3pm one, User Contributed Perl Documentation energy β¨), and honestly? You're about to eat. This is the module that hands you all the constants for telling Firefox exactly what to yeet from its cache. No cap.
Version: 1.63 π
β¨ SYNOPSIS β¨
use Firefox::Marionette();
use Firefox::Marionette::Cache qw(:all);
my $firefox = Firefox::Marionette->new();
$firefox->go('https://google.com'); # where is a good site to produce a lot of cookies?
$firefox->go('about:blank');
$firefox->clear_cache(CLEAR_COOKIES());
not the comment in the code being a genuine question π it's giving "asking for a friend". Anyway, that's the whole vibe: spin up Firefox, go make a mess somewhere, go back to about:blank, then clear the specific thing you want gone. π
πΈ DESCRIPTION πΈ
This module handles the implementation of the Firefox cache constants. Where do they come from? Sourced from toolkit/components/cleardata/nsIClearDataService.idl β that's <https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/cleardata/nsIClearDataService.idl> if you wanna peek at the source of truth. π¦
Now here's the tea: cache settings in Firefox have changed a lot, and they're still changing in 2024. So the ones that have been historically available AND stable β meaning they've at least kept the same number this whole time β are CLEAR_COOKIES, CLEAR_NETWORK_CACHE and CLEAR_IMAGE_CACHE. Those three are your ride-or-dies. π«Ά
For the other variables? YMMV. Literally your mileage may vary, bestie, so don't come for me if a number shifts. ππ¨
π CONSTANTS π
Every single one, no skips, no summarising, we're going the whole way down. β
CLEAR_COOKIES
returns the value of CLEAR_COOKIES, which is 1 << 0 = 1
CLEAR_NETWORK_CACHE
returns the value of CLEAR_NETWORK_CACHE, which is 1 << 1 = 2
CLEAR_IMAGE_CACHE
returns the value of CLEAR_IMAGE_CACHE, which is 1 << 2 = 4
CLEAR_JS_CACHE
returns the value of CLEAR_JS_CACHE, which is 1 << 3 = 8
CLEAR_DOWNLOADS
returns the value of CLEAR_DOWNLOADS, which is 1 << 4 = 16
CLEAR_MEDIA_DEVICES
returns the value of CLEAR_MEDIA_DEVICES, which is 1 << 6 = 64
CLEAR_DOM_QUOTA
returns the value of CLEAR_DOM_QUOTA, which is 1 << 7 = 128 (LocalStorage, IndexedDB, ServiceWorkers, DOM Cache and so on.)
CLEAR_PREDICTOR_NETWORK_DATA
returns the value of CLEAR_PREDICTOR_NETWORK_DATA, which is 1 << 8 = 256
CLEAR_DOM_PUSH_NOTIFICATIONS
returns the value of CLEAR_DOM_PUSH_NOTIFICATIONS, which is 1 << 9 = 512
CLEAR_HISTORY
returns the value of CLEAR_HISTORY, which is 1 << 10 = 1024 (Places history)
CLEAR_MESSAGING_LAYER_SECURITY_STATE
returns the value of CLEAR_MESSAGING_LAYER_SECURITY_STATE, which is 1 << 11 = 2048
CLEAR_AUTH_TOKENS
returns the value of CLEAR_AUTH_TOKENS, which is 1 << 12 = 4096
CLEAR_AUTH_CACHE
returns the value of CLEAR_AUTH_CACHE, which is 1 << 13 = 8192 (Login cache)
CLEAR_SITE_PERMISSIONS
returns the value of CLEAR_SITE_PERMISSIONS, which is 1 << 14 = 16384
CLEAR_CONTENT_PREFERENCES
returns the value of CLEAR_CONTENT_PREFERENCES, which is 1 << 15 = 32768
CLEAR_HSTS
returns the value of CLEAR_HSTS, which is 1 << 16 = 65536 (HTTP Strict Transport Security data)
CLEAR_EME
returns the value of CLEAR_EME, which is 1 << 17 = 131072 (Media plugin data)
CLEAR_REPORTS
returns the value of CLEAR_REPORTS, which is 1 << 18 = 262144 (Reporting API reports)
CLEAR_STORAGE_ACCESS
returns the value of CLEAR_STORAGE_ACCESS, which is 1 << 19 = 524288 (StorageAccessAPI flag, which indicates user interaction)
CLEAR_CERT_EXCEPTIONS
returns the value of CLEAR_CERT_EXCEPTIONS, which is 1 << 20 = 1048576
CLEAR_CONTENT_BLOCKING_RECORDS
returns the value of CLEAR_CONTENT_BLOCKING_RECORDS, which is 1 << 21 = 2097152 (content blocking database)
CLEAR_CSS_CACHE
returns the value of CLEAR_CSS_CACHE, which is 1 << 22 = 4194304 (in-memory CSS cache)
CLEAR_PREFLIGHT_CACHE
returns the value of CLEAR_PREFLIGHT_CACHE, which is 1 << 23 = 8388608 (CORS preflight cache)
CLEAR_CLIENT_AUTH_REMEMBER_SERVICE
returns the value of CLEAR_CLIENT_AUTH_REMEMBER_SERVICE, which is 1 << 24 = 16777216 (clients authentification certificate)
CLEAR_CREDENTIAL_MANAGER_STATE
returns the value of CLEAR_CREDENTIAL_MANAGER_STATE, which is 1 << 25 = 33554432 (FedCM)
CLEAR_COOKIE_BANNER_EXCEPTION
returns the value of CLEAR_COOKIE_BANNER_EXCEPTION, which is 1 << 26 = 67108864
CLEAR_COOKIE_BANNER_EXECUTED_RECORD
returns the value of CLEAR_COOKIE_BANNER_EXECUTED_RECORD, which is 1 << 27 = 134217728
CLEAR_FINGERPRINTING_PROTECTION_STATE
returns the value of CLEAR_FINGERPRINTING_PROTECTION_STATE, which is 1 << 28 = 268435456
CLEAR_BOUNCE_TRACKING_PROTECTION_STATE
returns the value of CLEAR_BOUNCE_TRACKING_PROTECTION_STATE, which is 1 << 29 = 536870912
CLEAR_STORAGE_PERMISSIONS
returns the value of CLEAR_STORAGE_PERMISSIONS, which is 1 << 30 = 1073741824
CLEAR_SHUTDOWN_EXCEPTIONS
returns the value of CLEAR_SHUTDOWN_EXCEPTIONS, which is 1 << 31 = 2147483648
CLEAR_ALL
returns the value of CLEAR_ALL, which is 4294967295 (0xFFFFFFFF) β the everything bagel π₯―β¨
CLEAR_PERMISSIONS
returns the value of CLEAR_PERMISSIONS, which is (CLEAR_SITE_PERMISSIONS | CLEAR_SHUTDOWN_EXCEPTIONS)
CLEAR_ALL_CACHES
returns the value of CLEAR_ALL_CACHES, which is (CLEAR_NETWORK_CACHE | CLEAR_IMAGE_CACHE | CLEAR_JS_CACHE | CLEAR_CSS_CACHE | CLEAR_PREFLIGHT_CACHE | CLEAR_HSTS)
CLEAR_DOM_STORAGES
returns the value of CLEAR_DOM_STORAGES, which is (CLEAR_DOM_QUOTA | CLEAR_DOM_PUSH_NOTIFICATIONS | CLEAR_REPORTS)
CLEAR_FORGET_ABOUT_SITE
returns the value of CLEAR_FORGET_ABOUT_SITE, which is (CLEAR_HISTORY | CLEAR_ALL_CACHES | CLEAR_COOKIES | CLEAR_EME | CLEAR_DOWNLOADS | CLEAR_PERMISSIONS | CLEAR_DOM_STORAGES | CLEAR_CONTENT_PREFERENCES | CLEAR_PREDICTOR_NETWORK_DATA | CLEAR_DOM_PUSH_NOTIFICATIONS | CLEAR_CLIENT_AUTH_REMEMBER_SERVICE | CLEAR_REPORTS | CLEAR_CERT_EXCEPTIONS | CLEAR_CREDENTIAL_MANAGER_STATE | CLEAR_COOKIE_BANNER_EXECUTED_RECORD | CLEAR_FINGERPRINTING_PROTECTION_STATE | CLEAR_MESSAGING_LAYER_SECURITY_STATE)
CLEAR_COOKIES_AND_SITE_DATA
returns the value of CLEAR_COOKIES_AND_SITE_DATA, which is (CLEAR_COOKIES | CLEAR_COOKIE_BANNER_EXECUTED_RECORD | CLEAR_DOM_STORAGES | CLEAR_HSTS | CLEAR_EME | CLEAR_AUTH_TOKENS | CLEAR_AUTH_CACHE | CLEAR_FINGERPRINTING_PROTECTION_STATE | CLEAR_BOUNCE_TRACKING_PROTECTION_STATE | CLEAR_STORAGE_PERMISSIONS | CLEAR_MESSAGING_LAYER_SECURITY_STATE)
π§ SUBROUTINES/METHODS π§
None. π (it's a constants module, she's just standing there, being useful, no methods required)
π DIAGNOSTICS π
None.
π CONFIGURATION AND ENVIRONMENT π
Firefox::Marionette::Cache requires no configuration files or environment variables. Zero setup, zero drama, she just works. π
π DEPENDENCIES π
None.
π INCOMPATIBILITIES π
None reported.
π₯ BUGS AND LIMITATIONS π₯
To report a bug, or view the current list of bugs, please visit <https://github.com/david-dick/firefox-marionette/issues>
go on, bestie, the issue tracker is right there, they don't bite π«Ά
β AUTHOR β
David Dick "ddick@cpan.org"
π LICENSE AND COPYRIGHT π
Copyright (c) 2024, David Dick "ddick@cpan.org". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.
π DISCLAIMER OF WARRANTY π
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
yes it's all caps, no we are not editing the legal text β the lawyers wrote it that way and honestly? iconic of them. βοΈβ¨
and that's the whole page, bestie! This one came to you from perl v5.40.1 and was dated 2025-03-16 β so if you're reading this in the future, hey, love that for you. π Now go clear some caches. π¦π
π¦ where this page comes from
- debian trixie: libfirefox-marionette-perl 1.63-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms