I would like to add simple site search, using Duckduckgo, limited to search only "example.com".
Stackoverflow has solved this, using some JavaScript to add the site:example.com
filter to the query.
<form onsubmit="var txt=$(this).find('input[name=\'q\']'); txt.val(txt.val() + ' site:stackoverflow.com');" action="http://www.duckduckgo.com/" method="get" id="duck-duck-go-search">
<input type="text" value="" maxlength="255" size="36" name="q">
<input type="submit" value="DuckDuckGo">
</form>
I'd prefer a solution that does not depend on JavaScript, though.
The URL should be http://duckduckgo.com/?q=site:example.com%20might
; the site:example.com
must be added to the q=
parameter, it seems.
Has anyone found a simple, non JavaScript solution for this?
Cons. DuckDuckGo doesn't offer as many services as Google and other search engines. It doesn't have the same market share as Google, so you cannot sync lots of your accounts and services with it.
Each time you search on DuckDuckGo, you have a blank search history, as if you've never been there before. We simply don't store anything that can tie searches to you personally.
I contacted DuckduckGo and got a solution from Weinberg himself.
There actually is a hidden sites param :). Try it! Gabriel, http://ye.gg
It was the plural (not site, but sites) that got me confused, but the solution is very simple:
http://duckduckgo.com/?q=duckduckgo& sites= stackoverflow.com
Or, in a simple HTML form:
<form action="https://duckduckgo.com/" method="get">
<input type="hidden" name="sites" value="stackoverflow.com">
<input type="search" name="q">
<input type="submit" value="Search">
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With