Force Firefox to search for URL instead of opening

2

1

I am using Firefox Developer Edition 57 and have search bar integrated with address bar like Chrome has. I like this feature, but have problems when I want to search for something that is or looks like URL; for example today I wanted to search for "mean.js".

In Chrome when I hit CTRL + K on keyboard (that's the way I invoke the search all of the time) ? is added in the very beginning of the address bar, which marks that whatever I enter is a search term. That way even if I enter a URL (like "mean.js") Chrome searches for that URL in the default search engine, instead of opening that URL. It seems it doesn't work that way in Firefox (even when I add ? manually).

Can I somehow force the Firefox to search for URL instead of opening it, when searching from the address bar?

Robert Kusznier

Posted 2017-10-18T10:35:06.090

Reputation: 187

Stick a ' at the front – DavidPostill – 2017-10-18T10:36:33.967

@DavidPostill When I do it, It searches for '<url> instead of just <url>. – Robert Kusznier – 2017-10-18T10:37:52.133

Yes, but the google search engine ignores the '. You get results not including the '. Try it. https://www.google.com/search?q=%27mean.js&ie=utf-8&oe=utf-8&client=firefox-b-ab

– DavidPostill – 2017-10-18T10:42:51.640

Eg, one of the search results is Difference between MEAN.js and MEAN.io. There is no ' in there.

– DavidPostill – 2017-10-18T10:43:54.303

@DavidPostill If it works, it still feels like a hack. I was wondering if Firefox support that in somehow clean way, especially with some keyboard shortcut that I could use (like Chrome does for CTRL + K). And I don't use Google but DuckDuckGo as my main search engine :P. – Robert Kusznier – 2017-10-18T10:45:01.017

I don't know of any other workaround :/ – DavidPostill – 2017-10-18T10:45:38.883

Okay. Then I'll be using that trick for now. Thanks :). – Robert Kusznier – 2017-10-18T10:46:00.053

You always can search using search bar. – atype – 2017-10-18T11:20:20.517

@DavidPostill's trick also works with DuckDuckGo. It appears to behave the same as enclosing in double-quotes (which also works), in that the . becomes part of the search string, instead of just a separator between the text strings either side; but that's probably what you want, anyway. – AFH – 2017-10-18T11:26:26.277

@atype - Read the question: there isn't a search bar. – AFH – 2017-10-18T11:27:21.077

@AFH Can't you add it back? Also, you can try using search provider shortcuts, then it will search sites, not open them. – atype – 2017-10-18T11:50:37.860

1@atype - Personally, I prefer separate search and address boxes, but the whole point of the question is that he wants to use the integrated combination box. Incidentally, even with separate boxes, quotes in the address box force a search. – AFH – 2017-10-18T12:17:58.787

I switched back to using a separate search and adress bar. – Robert Kusznier – 2017-10-18T12:29:42.077

Answers

2

I personally use keywords for search engines, for ex.: "#qw www.url.lol" will search "www.url.lol" on Qwant. Go to "preferences > Search (tab)" and set new keywords to the search engines.

Azarilh

Posted 2017-10-18T10:35:06.090

Reputation: 50

1That is pretty good. Do you maybe know a way to bind one of those search keywords to a keyboard shortcut? – Robert Kusznier – 2017-10-18T13:25:15.637

From your system settings maybe. I'm using KDE, from shortcuts' settings i can add shortcuts to write entire senteces. Sorry for the delay. – Azarilh – 2017-10-23T22:22:38.233

Note that you can also set keywords conveniently by right-clicking into a search input. I've always had g as my keyword for Google, so my "shortcut" for "search instead of open" is Home+G+Space. That's not too bad, is it? – Christallkeks – 2017-12-04T11:57:22.420