DEV Community

Ryan Westlund
Ryan Westlund

Posted on • Updated on

How to feel about <a ping>?

Today I found out about the ping attribute. At first I was outraged. But then I read an article making the point that disabling this can't possibly stop web apps from doing it, since they can just use XHR on click event handlers. Now I'm less sure what to think about it. It definitely makes tracking easier, but maybe not implementing it would just lead to tracking via more complicated means like XHR, which could consume more development time or have bugs.

But it still makes tracking easier, and that encourages more websites to do it. And worse, the ping attribute works without Javascript!

But then, if websites use <a ping> for tracking, then the user can turn it off if the browser has such an option. If they're forced into using more obscure means via Javascript, then there can't easily be a browser setting to stop it because it's not obvious what code is being used for tracking. So maybe providing an explicit, easy means for websites to track us actually makes it easier for us to avoid being tracked.

Discussion (3)

yujiri8 profile image
Ryan Westlund Author

It lets websites gather information about you.

But if you mean why that's a problem if it doesn't visibly affect the user, that's a good question. I don't care about it nearly as much as I used to, but the thought of third parties having that level of personal information about us is unnerving, since they can use it against us (for example, social media sites can filter what you see based on it so you don't see what everyone else does, or they could display a different price on an item if they know who you are and know you can afford it, etc). In the worst case, data like that can be weaponized (eg. 1984-style, here's an article talking more about the common worries: