Stop DuckDuckGo clickjacking

June 15 2020 by Jeff Johnson

You may think that only Google is guilty of clickjacking search results, but DuckDuckGo is guilty too. Although the "crime" is not nearly as bad in this case, DuckDuckGo still uses JavaScript to intercept your link clicks, and there's no good reason for it. One consequence of this clickjacking is that your Safari browsing history gets messed up. Let me illustrate with an example. I searched for "StopTheMadness", clicked on the link for the product's home page, clicked on the link for the product's support page, and then opened Show All History in Safari:

StopTheMadness on DuckDuckGo

StopTheMadness home page

StopTheMadness support page

Safari History

Notice that is missing from the history! What happened? DuckDuckGo intercepts the link click and then redirects you to the result page, for some strange reason. Fortunately, there's now a solution to this problem. Today I've released version 15.3 of my Safari extension StopTheMadness in the Mac App Store. To stop DuckDuckGo clickjacking, install StopTheMadness, create custom website options for, and then enable the "All mouse clicks" option. Now when you repeat the search, your Safari history is correct:

StopTheMadness Website Options

Safari History

The "All mouse clicks" website option is not available in the "Default options for all websites" because it would cause too much website breakage if enabled globally. But in special cases such as DuckDuckGo search results, it can be very useful.

Jeff Johnson (My apps, PayPal.Me)