We noticed that link counters won’t increase if you right-click on them and select ‘open in new tab’, or if you use the middle mouse button on them.
That’s because it’s a browser function, there’s no click action to catch. AFAIK the destination page won’t see a referrer either, it’s akin to copy-pasting the URL into the address bar.
5 Likes
does the same issue happen for middle click or control click?
That makes sense, thanks!
It does. I included that in my post
4 Likes
The <a ping> attribute could be used to increment the counter.
Caveats:
- It’s disabled by default in Firefox.
- there don’t seem to be any JS events for it, so the counter would only visibly be updated the next time the post was visited.
NB: It seems like “mousedown
” events are triggered on middle click, but that would have false positives as not every click ends up being a navigation - eg. copy link, customised browser settings.
1 Like