question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable tracking through push notifications

See original GitHub issue

Based on comment from article about Firefox price tracking feature:

user_pref("dom.push.connection.enabled", false);
user_pref("dom.push.enabled", false);
user_pref("dom.webnotifications.enabled", false);
user_pref("dom.webnotifications.serviceworker.enabled", false);

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Thorin-Oakenpantscommented, Nov 22, 2018

I’m not 100% sure, but push notifications require workers (or service workers). I wouldn’t mind clarifying that point for my sanity. Yup, it requires JS.

from here

as of FF64 the permissions API itself only supports geolocation, notifications/push and persistent-storage.

1-liner for the Permissions API to query all permissions currently listed at https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query:

for (const a of [ 'accelerometer', 'accessibility-events', 'ambient-light-sensor', 'background-sync', 'camera', 'clipboard-read', 'clipboard-write', 'geolocation', 'gyroscope', 'magnetometer', 'microphone', 'midi', 'notifications', 'payment-handler', 'persistent-storage', 'push' ]) navigator.permissions.query({name:a}).then(e => console.log("permission for", a, ":", e.state)).catch(console.log);

Don’t run it on a privileged page 😉

camera and mic permissions are probably queryable but would need certain prefs enabled like media.navigator.enabled

and here’s a pretty picture meh

If you deviate from default “ask”, then a script could detect that, as it wouldn’t be “prompt” - it would be “block” or “allow”. That said, I doubt anyone uses this for FP’ing, as it could vary from site to site per user.

1reaction
nchvcommented, Nov 22, 2018

Interesting. Testing with TBB I get the same output. Testing with ungoogled-chromium (where I have disabled all except sound in chrome://settings/content) I get:

TypeError: Failed to execute 'query' on 'Permissions': GenericSensor flag is not enabled.
    at <anonymous>:1:306
TypeError: Failed to execute 'query' on 'Permissions': Accessibility Object Model is not enabled.
    at <anonymous>:1:306
3TypeError: Failed to execute 'query' on 'Permissions': GenericSensor flag is not enabled.
    at <anonymous>:1:306
TypeError: Failed to execute 'query' on 'Permissions': The provided value 'persistent-storage' is not a valid enum value of type PermissionName.
    at <anonymous>:1:306
DOMException: Failed to execute 'query' on 'Permissions': Push Permission without userVisibleOnly:true isn't supported yet.
    at <anonymous>:1:306
Promise {<resolved>: undefined}
VM76:1 permission for background-sync : denied
VM76:1 permission for camera : granted
VM76:1 permission for clipboard-read : denied
VM76:1 permission for clipboard-write : granted
VM76:1 permission for geolocation : denied
VM76:1 permission for microphone : granted
VM76:1 permission for midi : granted
VM76:1 permission for notifications : denied
VM76:1 permission for payment-handler : denied

I wonder where the “granted” comes from and whether it is some kind of bug in chrome itself (assuming that the testing method is right).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Turn Off Push Notification (Android)
Go to Your Phones Settings Go to your phone's settings by clicking the cogwheel icon · Go to Apps and Notifications · Click...
Read more >
Turning Off Push Notifications on Android to Stop Distractions
If an app sneaks through, or starts abusing the privilege, you can generally block notifications directly by swiping left, right, or down on...
Read more >
How To Disable Apple And Google's COVID-19 Notifications ...
Just go to the settings app, click on Google|COVID-19 exposure notifications, and you can toggle them on or off from there. From the...
Read more >
Change your Google notifications - Android
On your Android phone or tablet, go to google.com. Search for the topic. Tap Notifications on to stop getting notifications for that topic....
Read more >
Stop Letting Push Notifications Ruin Your Productivity
Disable all notifications on both your desktop and smartphone. Turn off your phone or set it to Airplane mode for set periods of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found