Ky sajt do të funksionojë me kufizime, teksa bëjmë mirëmbajtjen e tij për të përmirësuar punën tuaj. Nëse një artikull nuk e zgjidh problemin tuaj dhe dëshironi të bëni një pyetje, kemi bashkësinë tonë të asistencës, e gatshme për t’ju ndihmuar, te @FirefoxSupport në Twitter dhe/r/firefox në Reddit.

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

As webdeveloper : how can i ask canvas usage before using it ?

  • 8 përgjigje
  • 1 e ka hasur këtë problem
  • 91 parje
  • Përgjigjja më e re nga Shnoulle

Firefox allow to disable access to canvas for lowering fingerprinting, it's cool !

But as web developer : i like to ask this access before try to using it,

Something like :

1. Do you alllow canvas ? 2. Show the browser part 3. Wait for user answer 4. It's OK : download PDF done with canvass 5. It's not OK : shown an error to user.

To avoid such situation (see screencast)

Firefox allow to disable access to canvas for lowering fingerprinting, it's cool ! But as web developer : i like to ask this access before try to using it, Something like : 1. Do you alllow canvas ? 2. Show the browser part 3. Wait for user answer 4. It's OK : download PDF done with canvass 5. It's not OK : shown an error to user. To avoid such situation (see screencast)
Foto të bashkëngjitura ekrani

Zgjidhje e zgjedhur

I think i ask access before using it, when page load. This allow more time for user to click on accept.

Can we close now ? I put the solution when i made it in github

Lexojeni këtë përgjigje brenda kontekstit 👍 0

Krejt Përgjigjet (8)

You appear to be using Firefox 101.0.1 with "Resist Fingerprinting" enabled. This means that by default canvas access is declined.

You can look at this pref on the about:config page.

I understand this , and "Resist Fingerprinting" become more common (hope) tomorrow.

> But as web developer : i like to ask this access before try to using it,


As a web developer : did a good solution exist to open the "requester" and allow user to check "Yes" before using it ?

"Resist Fingerprinting" is more aimed at the browser created by the Tor project as there privacy is more important than website compatibility. On release versions you need to accept that it has a lot of limitations like the timezone and screen dimensions and access to local fonts and also access to canvas. With the pref I mentioned above, Firefox should ask for permission to access canvas instead of automatically declining it. As a web developer you can't affect this behavior, it is up to the visitor to decide whether to accept or decline.

Then : there are no solution to wait for the answer of the user before continue (or not) javascript. Like a confirm method.

You don't have to use long sentence, just tell : no solution …

For the developer of a webpage there is no other way than warn the user that canvas access can possibly be blocked as I assume that you won't be able to detect this. In current releases using RFP still gives you a Firefox ESR user agent (currently 91.0), but that is about to be changed in 102+.

  • resistFingerprinting: report Firefox's real major version instead of the ESR version.

Twelve years old, but does this work:

https://stackoverflow.com/questions/2745432/best-way-to-detect-that-html5-canvas-is-not-supported

Oh wait, the problem is not that canvas access is denied, the problem is that the image data is silently randomized.

I don't know how to efficiently figure that out (I don't work with any image libraries).

Zgjidhja e Zgjedhur

I think i ask access before using it, when page load. This allow more time for user to click on accept.

Can we close now ? I put the solution when i made it in github