mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 14:40:18 +00:00
LibWeb+LibWebView+WebContent: Replace DNT with GPC
Global Privacy Control aims to be a replacement for Do Not Track. DNT ended up not being a great solution, as it wasn't enforced by law. This actually resulted in the DNT header serving as an extra fingerprinting data point. GPC is becoming enforced by law in USA states such as California and Colorado. CA is further working on a bill which requires that browsers implement such an opt-out preference signal (OOPS): https://cppa.ca.gov/announcements/2025/20250911.html This patch replaces DNT with GPC and hooks up the associated settings.
This commit is contained in:
parent
d9ebd44924
commit
b4df857a57
Notes:
github-actions[bot]
2025-09-16 08:39:19 +00:00
Author: https://github.com/trflynn89
Commit: b4df857a57
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6175
Reviewed-by: https://github.com/gmta ✅
22 changed files with 105 additions and 60 deletions
|
@ -134,18 +134,6 @@ WebIDL::Long Navigator::max_touch_points()
|
|||
return 0;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/tracking-dnt/#dom-navigator-donottrack
|
||||
Optional<FlyString> Navigator::do_not_track() const
|
||||
{
|
||||
// The value is null if no DNT header field would be sent (e.g., because a tracking preference is not
|
||||
// enabled and no user-granted exception is applicable); otherwise, the value is a string beginning with
|
||||
// "0" or "1", possibly followed by DNT-extension characters.
|
||||
if (ResourceLoader::the().enable_do_not_track())
|
||||
return "1"_fly_string;
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
GC::Ref<ServiceWorker::ServiceWorkerContainer> Navigator::service_worker()
|
||||
{
|
||||
if (!m_service_worker_container)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue