I notices when i go to some sites (include Stackoverflow) by Firefox a little blue circle shows I can add the site to my Search providers . so wanted to know how can add this feature to my MVC project . I Heared an XML file should be added ...
Asked
Active
Viewed 499 times
1 Answers
3
Follow the instructions in this guide.
This is the meat and veg of it though...
The link in your master page:
<link rel="search" type="application/opensearchdescription+xml" href="http://mysite.com/browserplugin.xml" title="My Site Search" />
The browserplugin.xml
file mentioned above should look like this:
<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>My Site Search</ShortName>
<Description>My Site Search</Description>
<Image height="16" width="16" type="image/x-icon">http://mysite.com/favicon.ico</Image>
<Url type="text/html" method="get" template="http://mysite.com/search/{searchTerms}"/>
</OpenSearchDescription>
Note that you should (obviously) change that urls appropriately according to your website. Specifically the Url in the OpenSearchDescription in order to match your search url.

Dan Atkinson
- 11,391
- 14
- 81
- 114
-
I know this is a really old post but I am trying to do the similar thing and I used the same code as you provided here (except for the url) but when I click on the plugin name, it says that it failed to download the plugin. I am using it in MVC3 app. Any help would be great. Thanks – SherCoder Aug 13 '12 at 22:42
-
I know this is a really old post but I am trying to do the similar thing and I used the same code as you provided here (except for the url) but when I click on the plugin name, it says that it failed to download the plugin. I am using it in MVC3 app. Any help would be great. Thanks – SherCoder Aug 13 '12 at 23:01
-
Which browser are you using? What was the error? I've just looked at this code again and it is pretty much verbatim on my site. I assume that you can access the browserplugin.xml file from the web? – Dan Atkinson Aug 14 '12 at 08:09
-
I am using Firefox 14.0.1 (latest) I tested it on my laptop and it downloaded and worked fine on firefox, chrome and IE9 but for some reason it doesn't work on my work desktop's firefox (I reinstalled firefox but still no luck, it works on chrome and IE9) – SherCoder Aug 14 '12 at 16:24
-
So, on the search bar where you can click the favicon to change the search option, there isn't the option to "add 'Site Name'"? The functionality isn't automatic in Firefox as far as I'm aware. More info here - http://davidwalsh.name/open-search – Dan Atkinson Aug 14 '12 at 17:35
-
I created a new project and add all files from old project to the new one and then ran it and it worked fine. I don't know why but it works. Thanks for your help. – SherCoder Aug 14 '12 at 19:20