搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Google advanced search operators (e.g. "site:") at the start of a request in the adress bar confuses Firefox

  • 3 个回答
  • 3 人有此问题
  • 20 次查看
  • 最后回复者为 morflorian

more options

I have firefox set up to use Google if I input something in the address bar, unless it looks like a URI (I think this is the default config on most configurations too).

Now I often use Google advanced search operators in my requests, such as site:, inurl:, intitle: and such.

The problem is, Firefox believes a request starting with non-whitespace followed by a colon is a URI.

For example, if I type "site:nytimes.com Firefox", Firefox displays the following error message: “The address wasn't understood. Firefox doesn't know how to open this address, because the protocol (site) isn't associated with any program.”.

There is an easy but cumbersome workaround: typing the keyword first and the operator next ("Firefox site:nytimes.com"). It is not convenient as I always type the special operators first.

I can imagine a hopefully simple solution: during the typing, Firefox might look for protocol-like patterns (something like "([^:]*?):") and, if the migth-be protocol has no handler, assume it is just a search engine request).

What do you think?

I have firefox set up to use Google if I input something in the address bar, unless it looks like a URI (I think this is the default config on most configurations too). Now I often use Google advanced search operators in my requests, such as site:, inurl:, intitle: and such. The problem is, Firefox believes a request starting with non-whitespace followed by a colon is a URI. For example, if I type "site:nytimes.com Firefox", Firefox displays the following error message: “The address wasn't understood. Firefox doesn't know how to open this address, because the protocol (site) isn't associated with any program.”. There is an easy but cumbersome workaround: typing the keyword first and the operator next ("Firefox site:nytimes.com"). It is not convenient as I always type the special operators first. I can imagine a hopefully simple solution: during the typing, Firefox might look for protocol-like patterns (something like "([^:]*?):") and, if the migth-be protocol has no handler, assume it is just a search engine request). What do you think?

由morflorian于修改

被采纳的解决方案

You can only enter such search parameters in the search bar directly and not in the location bar.

In the location bar you need to use a keyword search or enter a parameter that has a colon not as the first parameter, but first specify the search terms.

定位到答案原位置 👍 2

所有回复 (3)

more options

morflorian wrote:

if the migth-be protocol has no handler, assume it is just a search engine request).

The main problem with that would be that Firefox would fail to notify the user in case of a valid protocol that's not associated with a program, and would instead send the URL as a search query. Firefox would appear broken, when in fact the problem is with the external application. That's far from desirable. This isn't an uncommon occurrence with externally-handled protocols like magnet.

Also, I don't think the vast majority of people are likely to run into this problem. Even those that do can easily work around it, by placing the search words first (e.g. gingerbread intitle:recipes), or by starting the query with a search engine keyword (e.g. g date:1 heartbleed aftermath). To assign a keyword to a search engine, click the icon in the search bar and choose Manage Search Engines.


If you feel very strongly about this, head over to the #firefox IRC channel and see if you can find someone familiar with the File Handling component. If they think this change is a good idea, you could then file a bug report.

more options

选择的解决方案

You can only enter such search parameters in the search bar directly and not in the location bar.

In the location bar you need to use a keyword search or enter a parameter that has a colon not as the first parameter, but first specify the search terms.

more options

Thank you, I still find it a little frustrating, but I think I will quickly get past this feeling once I have become used to prefixing my requests with a keyword as you suggested. It is very nice of you to have answered so quickly!