June 28, 2005

In Mozilla/Firefox for Linux, if you middle-click in a browser window, the contents of your clipboard are sent to Google, and to whatever web site shows up as the first search result with your clipboard contents as the query string.

This is a feature. In Unix-like environments, selecting something copies it to the clipboard, and middle-click pastes—and this is often very handy. The Linux version of Firefox (and Firefox for any other platform with this feature explicitly enabled) allows you to middle-click-paste any URL into any browser window to visit the URL. If what you paste is not a URL, it treats it as a Google search, with Google's "I'm Feeling Lucky" feature turned on, so you automatically go to the first search result. That web site gets the Google search query in the referral string.

I almost never use this feature on purpose. But I almost always click on links with the middle mouse button, which, on a link, opens the link in a new tab. If I slip and miss the link when I click, whatever is on my clipboard—perhaps something I copied a long, long time ago, perhaps something personal or confidential, perhaps something I selected by accident while dragging my mouse around—becomes a Google search and ends up in somebody's referral log. This happens so often, I have to consider it a security risk.

To disable or enable this feature in Firefox: Enter about:config in the address bar, then find the preference called middlemouse.contentLoadURL. Double-click on it to toggle its value: "true" means it is enabled, "false" means it is disabled. Notice that middle-click for opening links in tabs, and middle-click for pasting into form fields or the address bar, are not affected, which is exactly what I want.

comments...

Wow, what a misfeature. I can see middle-clicking in the location bar doing that, but in the page? Duh.

This had been driving me nuts on Linux since I installed it a few days ago. On Windows, I use middle-click all the time to get the autoscroll thing, so I ended up submitting my clipboard contents all the time by habit... :( It took me a while to figure out what was going on, and then I set out to fix it. For a minute, I thought I'd fixed it by enabling autoscrolling in the preferences, since it makes middle-clicking pop up the autoscroll cursor which you can use just like Windows.. but then Firefox keeps submitting the clipboard contents to Google anyway! This is a really dumb feature, along with the auto-preloading of sites linked on the current page (does Mozilla's main page have pay-per-click ad links or something? I don't know what they were thinking).

Anyway, thanks to you it's fixed for me now :)

(for karma) The option to disable the prefetching I preferred to is network.prefetch-next (also found in about:config). Double-click it to set it to false. Disabling this option may prevent you from getting fired at work in the case that a site known to be questionable comes up as a possible hit in a Google search (this would be subsequently automatically followed by the prefetch if not disabled).

>Wow, what a misfeature. I can see middle-clicking in the location bar doing that, but in the page? Duh.

----
As a long time linux mozilla user, I love this feature, and miss it when I'm stuck on a windows machine.

So thank you for reminding me which config to change to turn it back on, since the new firefox default is for this feature to be disabled.

Different strokes for different folks.

But this does highlight a problem with cross-platform development. The mozilla/firefox folks want to make a consistent user interface across platforms, but the different platforms have conflicting conventions. Copy and paste in X is fundamentally different than it is in Windows, so we end up with hidden configs to change from one behaviour to another.

Fantastic! I found that the middle click in Forefox on a tab name also initiated the Google search rather than closing the tab. Arrgh, talk about a pain in the back side. Thanks for your post, I'm a lot happier now :)

Great; I mentioned this to a friend -- and how it bugged me -- and he linked me to this article.

Nicely spotted -- It's good to middle click :)

Thanks!! You saved me from the most annoying thing about Firefox on Linux (as opposed to Windows): a stray middle-click sends the contents of your clipboard to Google and browses away from your current page (the one you were trying to middle-click a link on, but missed by one pixel)...!

I wonder how much confidential information Google has obtained so far, by people's accidental middle-clicks? Makes me worry about Google's increasing dominance of Firefox development. Google doesn't need "Gbrowser", it already has Firefox!

Thank you so much!!! This is the most annoying feature I've ever come across and finally I can disable the goddam thing!! Thank you....I can breathe again. I still want to swear very loudly at the screen at the memory of so many annoying middle click accidents...especially when filling out a form...GRAWRRR! Thank you again :)

Tom

You can use the ctrl modifier to use the middle click to open up your search/url in a new window.

It seems like people from the windows world hate this feature, and people who have used it in linux for a long time miss it. I know that I found this page looking for a way to turn it back on, as did someone else.

Now, if there was a way to change it so that it feeling-luckied wikipedia only :)