Help:Searching from a web browser
This subpage of Wikipedia:Searching details how browsers can be configured to search within Wikipedia.
Wikipedia's search plugin for the search bar (Firefox versions 2 and 3, Internet Explorer since version 7)
All Wikipedia pages offer to add the Wikipedia search plugin for OpenSearch standard compatible browsers (Internet Explorer 7.x, Firefox 2, 3). This means, that you do not need special plugins any longer.
The offer of the search plugin is signalled on any page by a technique called "Auto-discovery".
- on Firefox browsers version 3 the triangle right of the symbol of the currently selected search engine (Google's G in the example) gets a blueish background. The user can choose to add the search engine offered by that page by clicking the small triangle:
- on Internet Explorer 7 the color of the search bar arrow symbol changes to orange.
Wikipedia's suggesting search plugin (for Firefox 2 or 3, Internet Explorer 8)
Wikipedia suggests articles matching your entry as you type for browsers which support the OpenSearch standard extension for suggestions. It works for Firefox 2.x/3.x users but not for Internet Explorer 6.0 or 7.0. You can also search other namespaces than the standard article namespace, for example, you can search for User:Kreuzbe. The screenshot shows the response of the German Wikipedia after the user has typed kreuzbe:
Using Mozilla to automatically search
Listed below are ways to search Wikipedia with Mozilla-based browsers, including Mozilla Suite, Mozilla Firefox, and Netscape 6 and 7.
Search Wikipedia from the sidebar or address bar
Works with: Mozilla Suite, Mozilla Firefox, Netscape 6/7.
Mozilla and Netscape 6 & 7 come with a sidebar that allows a user to search the Wikipedia site, and Firefox has a toolbar item to do the same. To install the search plugin that tells Mozilla how to search Wikipedia, do the following:
- Go to one of the following sources of Wikipedia search plugins. The Mycroft plugins are sometimes out of date, and plugins from the second source may work better.
- There are versions for many languages, so pick the language local to your area.
- If JavaScript is enabled, clicking on the name of the search plugin will automatically install the search plugin.
- If you can't install the search plugin automatically, the second source above lets you right-click on the plugin and save it to disk, or download a ZIP file containing all available plugins. Save the downloaded .src file in the searchplugins directory where Mozilla is installed and restart the browser to use the new plugin.
To make Wikipedia your default search engine in Mozilla, Beonex Communicator, and Netscape 6/7:
- Go to Edit, Preferences.
- Expand the Navigator tree and choose Internet Search.
- Choose Wikipedia as your default search engine.
With Wikipedia selected as your default engine, searches can be conducted via the search sidebar tab, search box, or the web address bar.
Search Wikipedia using a custom keyword
Works with: Mozilla Suite, Mozilla Firefox, Netscape 6/7, Beonex Communicator, Camino.
Wikipedia can also be searched via a custom keyword.
- Create a new bookmark (Bookmarks/Manage Bookmarks/New Bookmark in Firefox).
- Enter "Wikipedia Quicksearch" for the name (without the quotes).
- Enter one of the following for the location, again without quotes:
- "http://en.wikipedia.org/wiki/Special:Search?search=%s" to search the English Wikipedia
- "http://de.wikipedia.org/wiki/Special:Search?search=%s" to search the German Wikipedia
- "http://www.google.com/search?q=site:wikipedia.org+%s" to use Google to search all Wikipedias
- Enter "w" (without the quotes) for the keyword.
- Click OK.
To search, go to the web address bar (Ctrl-L), enter "w SEARCH_QUERY" (without the quotes), and press Enter.
Many versions of Firefox include this wikipedia quicksearch by default, but use "wp SEARCH_QUERY" instead of the form mentioned above.
Note: This can also be done with Opera and Internet Explorer, see below.
Searching with bookmarklets
Javascript can bring additional functionality to your bookmark. The following javascript can be pasted in as the 'Location' of a new bookmark created manually, for example in the 'Manage Bookmarks' window of Firefox. If you highlight a word in a webpage then hit the new bookmark, javascript grabs the word you have selected and uses that to perform the search. If no word is highlighted, you will be prompted to enter one.
javascript:x=escape(getSelection());if(!x)%7Bvoid(x=prompt('Enter%20Word:',''))%7D;if(x)window. location='http://en.wikipedia.org/wiki/Special:Search?search='+x
The whole thing should be pasted in as a single line without spaces for it to work.
Internet Explorer
To enable a quick search from the Windows and Internet Explorer Address bars, do the following
- Open Notepad.
- Insert all of the text in the box below this list of steps.
- Choose File | Save as and save the file as "wikipedia.reg" (either use quote marks around the file name or choose All Files from the Save as type drop-down in Notepad's Save dialog).
- Double-click on the "wikipedia.reg" file to add the key to your Windows Registry.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\w] @="http://en.wikipedia.org/wiki/Special:Search?search=%s" " "="+" "#"="%23" "&"="%26" "?"="%3F" "+"="%2B" "="="%3D"
This will allow you to for example type "w french revolution" (without the quotes) into the Windows and Internet Explorer Address bars to immediately search Wikipedia for the search term you've specified.
Note: There are other URLs you can specify instead of the Default (@) key given above. For instance, the line
@="http://de.wikipedia.org/wiki/Special:Search?search=%s"
will search the German Wikipedia and
@="http://www.google.com/search?q=site:wikipedia.org+%s"
will use Google to search all language Wikipedias.
Safari + Saft
Works with: Safari plus the Saft plugin [1]
Results similar to those described for Mozilla can be attained with Safari and Saft. In the Preferences menu of Safari, choose the Saft section, then the Shortcuts tab. Click Add and enter "Wikipedia" (without the quotes) for the name, with "w" (again, no quotes) for the shortcut. The URL is similar to those listed above, with a change in the last character. Enter the text below in the URL field.
http://en.wikipedia.org/wiki/Special:Search?search=%@
Click OK, and close the preferences window. Now typing "w" followed by a space and your search term in the address bar of Safari will take you immediately to your search results. This can be easily altered to search Wikipedia in other languages.
Opera
From version 9.5, Opera has Wikipedia added as a default search option from the search interface in the menu to the right of the address bar. It is also possible to search by typing the keyword 'w' in the address bar; for example, "w opera web browser" to search Wikipedia for information about Opera. With address-bar search one can get the results to open in a new tab by holding down the shift key while clicking the enter key. [1] Holding down the shift key also works with Wikipedia's sidebar search or Special:Search. It does not work with the menu search to the right of the address bar.
Previous versions
From version 9, Opera can automatically generate a custom search engine from any search box. To add a Wikipedia QuickSearch:
- Right click in the text box and click "Create search..."
- Choose a keyword. This can be any length, but the shorter the better. (For example 'w' is better than, say, 'wiki'. Also note that the default key for download.com (pre 9.5) is 'w' so if you wish to use 'w' you will need to change download.com's search first.)
- In the expanded view (click "Details >>") there is also an option to use this engine as the default. This means that upon highlighting some text and right clicking, clicking "Search" will search Wikipedia.
- The engine will appear in the menu to the right of the address bar. Furthermore a search can be initiated by typing "<keyword> <search terms>" into the address bar; for example, "w opera web browser" to search Wikipedia for information about Opera.
- Alternatively, engines can be added manually in the Search tab of Preferences. Click the "Add..." button and enter the following information:
Name: &Wikipedia Keyword: w Address: http://en.wikipedia.org/wiki/Special:Search?search=%s
All Opera versions since v6 use a customizable text file called search.ini. This file should only be edited while Opera is not running. The following example replaces one of the existing pre-defined search engines. It is up to the user to avoid conflicts of shortcut key (key=). By default 'w' is taken by the download.com search, so either this or the Wikipedia one should be changed. Furthermore the 'Search Engine ##' should be replaced with a free number: '12' is free by default. The Search.ini editor (see link below, in the "More information" section) makes editing trivial.
[Search Engine ##] Name=&Wikipedia URL=http://en.wikipedia.org/wiki/Special:Search?search=%s Query= Key=w Is post=0 Has endseparator=0 Encoding=utf-8 Search Type=8
- Opera 8 appears to take a copy of the "search.ini" and load it into an internal buffer of some type. After editing the file with your new entry you must change the "File Version" at the top of the file to allow for your changes to be seen in the browser.
- In Opera 7.0, you should back up your customized search.ini because the file is overwritten by the Opera installer. This is no longer true in 7.10 and later.
- In Opera 6 and 7.0, the menu accelerator letter is defined by the & in the name. In current versions the accelerator is automatically generated and may no longer be the same as the key.
More information
- Searching with Opera
- How to edit Opera's search.ini (recommended reading prior to hand-editing search.ini)
K-Meleon
K-Meleon has a search button that can be used to search Google. You can change it to search Wikipedia instead, by doing this:
- Close K-Meleon.
- Open up prefs.js with a text editor. The file should be in your K-Meleon\Profiles\PROFILE_NAME\RANDOM_STRING.slt\ directory.
- Add this line, and save prefs.js.
user_pref("kmeleon.general.searchEngine", "http://en.wikipedia.org/wiki/Special:Search?search=");
Open up K-Meleon and press the search button to search Wikipedia. To go back to Google or to use another search service, edit prefs.js and delete the added line
Make sure K-Meleon is closed before editing prefs.js.
Avant & Orca
The Avant and Orca browsers support quick searching from the address bar as well. You can access the settings in the "Search Engine" dialog of the browser's options. There, you will be presented with two tabs: in the "Quick Search" tab, simply click "Add", type a keyword and press Enter, type the URL string ending in %s (the same as in Mozilla/Firefox) and press Enter again.