You are invited to Log in or Register a free Frihost Account!

This site Highlighted my Search Queries.


My google search what is southbridge gave me one page where my search values were highlighted.

How was this page able to highlight these search values.?

Thank you
The website can detect the referrer page easily. If the referrer is a search engine with some query, it knows that the traffic is sent with a search engine with some queries. like if the referrer page is then it can know it is a traffic from google with the query "hello world". It is the method that analytics record which keyword made the traffic. Knowing this value, you can program a site to highlight the keywords.
Does that mean if you leave a website and go to another website the second website you visit will know what website you left.
If you click a link in a website and go to another website, the other website can know where you came from. But if you visit another website by typing in the address bar of the browser, it wont know. If some one clicks the link of your frihost signature and visits your website, you can know that he came from frihost.
How would I code this into my site. I'm more interested in how this is done rather than doing it myself.

I found this firefox add-on that does much the same thing.
You can easily find it out in php. The landing page can know the referrer URL by this way

$page_name = $_SERVER['HTTP_REFERER'];

You can just analyse the URL and detect what is passed in the "q" get variable (I dont know how to do this) because most search engine use that to passed the search query. You can use analytics for better reporting.

Highlighting your content might be more difficult because you first have to seperate the search query word(s) from the url of the referrer. And you have to search each word in the content and add the highlighting code. Also, for this you must have the content of your file in a variable so that you can edit the content during runtime. Maybe there are other ways but i dont know of them. I dont think the feature is so impressive that you code your site in such complex ways...

Some CMS may allow you to do it more easily(maybe with some plugins). Best of luck.
i just found this link and hope you may found it useful. it is a javascript that highlights the keywords....same thing you want....
Some sites really do that? I haven't encountered one yet.
The closest I've seen is google's cached pages.
iman wrote:
Some sites really do that? I haven't encountered one yet.
The closest I've seen is google's cached pages.

Indeed, Google's cached pages are a good example, and the same technique they use can be used by others. Since the query came from Google and the result did also, it is unlikely to surprise anyone when they see their keywords highlighted. It seems a little spooky to me when I see it on another site, though.

To prevent the referrer information being passed, try Google's new beta page:

You will then find that cached pages will not be shown with highlighted keywords, and referrer information will not be passed on to other sites. This may sometimes be an inconvenience, but it does increase privacy. Since it is in Beta Test status, don't count on it to work flawlessly yet though.
I think that phpBB forums also highlight the google keywords by default. Although it could be that Google sometimes doesn't share the keywords anymore (by redirects, ...).
Related topics
Search Your Web Site with Yahoo! is BACK!!!- Access blocked sites@school
A question about my site and the search engines
Coming soon: Google Voice Search
Rules to Make Your Site Annoying
How do you attract people to your WEB SITE?
Publishing My web site to search engines?
How to add your site to search engines
Black Hat SEO
search feature problems in forum
Microsoft Launches , A Silverlight Search Tool
Get your site listed in search engines.
Windows Live Search Webmaster Portal (beta) Launched
Site wise search engine
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> SEO and Search Engines

© 2005-2011 Frihost, forums powered by phpBB.