this post was submitted on 27 Mar 2025
890 points (90.8% liked)

Fediverse memes

1685 readers
344 users here now

Memes about the Fediverse.

Rules

General
Specific

Elsewhere in the Fediverse

Other relevant communities:

founded 10 months ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lena@gregtech.eu 0 points 4 months ago (3 children)

I don't think that is true, iirc you can't track simple clicks on HTML a elements.

[–] mattd@programming.dev 5 points 4 months ago (1 children)

Apart from using JavaScript, there’s also a way to track links in HTML

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#ping

[–] lena@gregtech.eu 3 points 4 months ago

TIL, thanks for sharing

[–] Irelephant@lemm.ee 3 points 4 months ago

with javascript you can just use an onclick.

[–] hikaru755@lemmy.world 2 points 4 months ago

Yes, you absolutely can, and it's super simple. Click listeners are one of the most basic things you can do with JavaScript, and there's nothing special about a elements that would make them not work. The only way to stop it from the user's side is to disable JavaScript in their browser, but that comes with the downside of the majority of websites and apps just plain not working anymore.