TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Prevent Google from mangling search result links when click/copying on Firefox

576 pointsby calmingsolitudeover 3 years ago

32 comments

varencover 3 years ago
Google does this so they have click tracking data. But they don&#x27;t need to mangle URLs in Chrome because it supports the `ping` attribute on &lt;a&gt; tags [0].<p>The ping attribute basically adds click tracking as a native browser feature so you don&#x27;t need to do URL redirects. It also makes these analytics much easier for the site and mysterious to the user. Looks like most vendors besides Firefox support it. (They were pretty opposed I recall)<p>If you&#x27;re a Chrome user, there&#x27;s some extensions that disable ping requests&#x2F;link auditing [1]. (EDIT: a commenter noted that uBlock Origin already blocks these! So I recommend that over this obscure extension)<p>[0] <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;ping" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;ping</a><p>[1] <a href="https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;ping-blocker&#x2F;jkpocifanmihboebfhigkjcdihgfcdnb" rel="nofollow">https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;ping-blocker&#x2F;jkpoc...</a>
评论 #28673962 未加载
评论 #28674195 未加载
评论 #28673977 未加载
评论 #28674012 未加载
评论 #28675995 未加载
评论 #28674003 未加载
评论 #28675973 未加载
评论 #28673985 未加载
评论 #28674793 未加载
评论 #28678209 未加载
评论 #28678089 未加载
评论 #28677201 未加载
评论 #28674701 未加载
评论 #28674064 未加载
评论 #28674508 未加载
akkartikover 3 years ago
I find link mangling to be a great test for when a service becomes too powerful relative to its users, able to add friction to its product that serves no purpose for its users[1]. Google started doing this around 2004[2]. Facebook didn&#x27;t do it until a few years ago. Slack and Discord don&#x27;t do it. Yet.<p>[1] Example: a search result that&#x27;s a pdf. How do I share this link? If I click on it it downloads to my disk. If I rightclick on it I can copy a crappy URL.<p>[2] <a href="http:&#x2F;&#x2F;akkartik.name&#x2F;firefox.html" rel="nofollow">http:&#x2F;&#x2F;akkartik.name&#x2F;firefox.html</a>
评论 #28675384 未加载
评论 #28674729 未加载
评论 #28675955 未加载
评论 #28676056 未加载
评论 #28674979 未加载
caromover 3 years ago
It is really worth it to switch to DuckDuckGo. You can throw a g! at the end of your search if you don&#x27;t like the results DDG gave and it will redirect you to Google. That was the feature that gave me the confidence to switch over, it&#x27;s painless to get different results, even on a mobile keyboard.
评论 #28674488 未加载
评论 #28674913 未加载
评论 #28675449 未加载
评论 #28674696 未加载
评论 #28708355 未加载
评论 #28674392 未加载
评论 #28676244 未加载
beltsazarover 3 years ago
I have no mangling issue—thanks to uBlock annoyances filter: <a href="https:&#x2F;&#x2F;github.com&#x2F;uBlockOrigin&#x2F;uAssets&#x2F;blob&#x2F;02d16a221c276fe58bdd72cc947b26eaf9d1318e&#x2F;filters&#x2F;annoyances.txt#L4560-L4561" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;uBlockOrigin&#x2F;uAssets&#x2F;blob&#x2F;02d16a221c276fe...</a>
评论 #28680211 未加载
BunsanSpaceover 3 years ago
There&#x27;s already an add-on which does this, and more. <a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;firefox&#x2F;addon&#x2F;clearurls&#x2F;" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;firefox&#x2F;addon&#x2F;clearurls&#x2F;</a>
评论 #28673675 未加载
评论 #28675799 未加载
评论 #28674101 未加载
hospadarover 3 years ago
To add a little color and for clarity:<p>Some google links (notably shopping links for products) don&#x27;t just point at a google-owned redirect (presumably for ad tracking&#x2F;payment calculation?), they also change the link target on click (?!?evil!?!). There are redirect-removal addons which re-write the original URL correctly, but the on-click handlers mangle the target of the link if the event is not blocked.
评论 #28674364 未加载
hagbard_cover 3 years ago
While this might solve the problem for the Google search engine it is but a patch to a bigger problem. Instead of applying this patch on each and every device you happen to use it is much more effective to refrain from using these search engines directly by using a meta-search engine like Searx [1]. This not only solves these obnoxious attempts at leaching a bit more data from you, it has an even bigger advantage: it shows search results from multiple engines, ranked in the way those engines present the results to an anonymous user. This often reveals interesting patterns by showing just how those who run these search engines either promote or demote relevant results for a given search. Google clearly prefers to show results from corporate media and established actors (e.g. Wikipedia) above those from non-affiliated sites, DuckDuckGo gives far more &#x27;organic&#x27; results.<p>[1] <a href="https:&#x2F;&#x2F;searx.me" rel="nofollow">https:&#x2F;&#x2F;searx.me</a>
评论 #28674242 未加载
coldacidover 3 years ago
My solution is simple: I don&#x27;t ever use Google Search. DDG results are good enough for me.
canadaduaneover 3 years ago
I&#x27;ve been using neeva.com lately, and I&#x27;m warming up to it. I like the idea of the search engine&#x27;s revenue coming from aligning with its searchers, rather than its advertisers.<p>One thing I dislike, however: making you agree to terms when sharing an invitation link with friends. You&#x27;d think they would want that to be zero mental friction?
jlpomover 3 years ago
Twitter also uses a redirect (t.co) and it&#x27;s very annoying
评论 #28676672 未加载
HelloMcFlyover 3 years ago
I have noticed this, but I have never understood what is happening. Still don&#x27;t, but nice to see a fix.
评论 #28673704 未加载
nullcover 3 years ago
Mozilla has refused to fix the stealth URL rewriting on mousedown&#x2F;onclick behavior for years[1]... it&#x27;s super toxic and harmful to user privacy.<p>Why do they bother not implementing pings when they allow an equivalent privacy invasion to continue? Either way the user&#x27;s privacy is invaded, but at least URL copy&#x2F;paste still works correctly with the ping functionality.<p>[1] e.g. <a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=229050" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=229050</a> though I&#x27;m sure there have been many other bugs filed on it.
Lammyover 3 years ago
I used to use “Google&#x2F;Yandex Search Link Fix” but it died along with XUL <a href="https:&#x2F;&#x2F;github.com&#x2F;palant&#x2F;searchlinkfix" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;palant&#x2F;searchlinkfix</a>
评论 #28674132 未加载
评论 #28676252 未加载
评论 #28678177 未加载
cyberpsybinover 3 years ago
Google is cancer to the web that has metastasized and become malignant.
neop1xover 3 years ago
It is also possible to use user scripts &amp; Violent Monkey on mobile - Kiwi browser [1], based on Chromium, supports browser extensions as well as full Developer Tools. :)<p>[1] <a href="https:&#x2F;&#x2F;kiwibrowser.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kiwibrowser.com&#x2F;</a>
dandanuaover 3 years ago
I wrote a simple addon that avoids just that <a href="https:&#x2F;&#x2F;github.com&#x2F;dandanua&#x2F;copy-true-link" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dandanua&#x2F;copy-true-link</a><p>The code doesn&#x27;t prevent event propagation, instead it copies the link before propagation happens. I guess this way is more reliable. It works on other sites too, like FB.
bjornstarover 3 years ago
While it doesn&#x27;t modify the behavior of any sites, Intercept Redirect automatically skips most redirect services. It&#x27;s a dead simple implementation that attempts to require the bare minimum permissions to do the job.<p><a href="https:&#x2F;&#x2F;intercept-redirect.bjornstar.com" rel="nofollow">https:&#x2F;&#x2F;intercept-redirect.bjornstar.com</a>
tsujaminover 3 years ago
Anyone on Safari who wants to run this script - UserScript (<a href="https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;userscripts&#x2F;id1463298887" rel="nofollow">https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;userscripts&#x2F;id1463298887</a>) seems to work well
musicaleover 3 years ago
It&#x27;s certainly a bad user experience to not be able to cut and paste links.<p>It&#x27;s also kind of a bad web search experience to have actual web search results hidden below ads and Google properties.<p>On the other hand, &quot;Google search&quot; is very good for searching Youtube and other Google properties.
pitterpatterover 3 years ago
Speaking of Google web products not working with Firefox: Google Meet backgrounds. What&#x27;s most frustrating there is that it used to work until they disabled it to just throw up an ad for Chrome (i.e. use a &quot;supported&quot; browser).
toss1over 3 years ago
Easier way:<p>Use DDG (or some other search engine)
senkoraover 3 years ago
Could this also solve the problem on Facebook Messenger? It does similar mangling.
评论 #28673583 未加载
kvarkover 3 years ago
I wonder about the detail at which W3C specifies the behavior of copying a link. Is it outside of the web spec, and thus could be non-portable?
Ironlinkover 3 years ago
I use <a href="https:&#x2F;&#x2F;startpage.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;startpage.com&#x2F;</a> instead<p>Good search results, with privacy
评论 #28674972 未加载
评论 #28675120 未加载
noxerover 3 years ago
Bookmarklet version<p>javascript:(function(){window.addEventListener(&quot;mousedown&quot;,(event)=&gt;{event.stopImmediatePropagation();},true);})()
MrPatanover 3 years ago
Why are you still using google search anyway?
fastssdover 3 years ago
Thank you for this. I thought something was wrong when I tried to hover over links, or I was going crazy. This explains a lot.
grapplerover 3 years ago
psst, don&#x27;t tell google, but sometimes I like to click the triple dots next to a search result and copy the url in the popup box to the clipboard to get the url without any of the tracking crap.<p>(I mostly do this when google&#x27;s redirect page lags for some reason)
评论 #28685464 未加载
einpoklumover 3 years ago
Can&#x27;t you just prevent most scripts on google.com from running, for this mangling not to happen?
a-dubover 3 years ago
they&#x27;ve been doing this for a very long time. didn&#x27;t know about this ping attribute for anchors though.<p>i always just assumed it was for improving the index. the more a result gets clicked, the more relevant it must be.<p>it&#x27;s kind of a zero&#x27;th order optimization.
评论 #28675612 未加载
评论 #28679939 未加载
IanSandersover 3 years ago
Shoutout to whoogle
plankersover 3 years ago
funny, i solved this problem by not using google