Google Custom Search

Google Search

Google offers a custom search engine (beta version) to webmasters to create a local search tool on a website or a blog. A quick and easy way consist in integrating a javascript code provided by Google on your webpage. The search engine can be customized to include more sites or to adapt the style of the results pages to the style of the website. Google provides tutorials, FAQ’s, developer documentation and featured examples to help webmasters to design the search tool.

Google’s “Terms of Use” state that you may not in any way frame, cache or modify the Results produced by the Google search engine. The results pages include advertisements placed by Google. For enterprises wanting ad-free results pages, Google offers various price plans for the Google site search.

A solution used in the past by several developers was based on javascript code to open a small search window for doing a local search on a website. An example for searching the saraproft.lu website is given below:

=======================================

<p><a href=”javascript:(function()

{ p=prompt(‘Entrez un texte pour faire une recherche dans le site saraproft.lu via Google Luxembourg.’,”);

if(p)

{ document.location.href=’http://www.google.lu/search?

q=site:saraproft.lu ‘+escape(p)} })();” >

Search</a></p>

=======================================

This solution has some disadvantages with the security mecanisms of the new browser generation and is no longer recommended.