CSS font stacks, developer FAQs & web standards

Your banner ad here

WestNIC provides reliable web hosting services

Site navigation below

This FAQ answers one of over 700 Web development questions submitted by Code Style readers. Sign-up to our premium content service to view the full answer.

Preliminary answer (stub article)

A: Yes, it is possible to get the referring search engine query, if the browser exposes the document.referrer property, which is the URL of a page that links to the current page. For security reasons, some browsers allow users to control whether referring page information is available. The complete example below solves several significant technical and other security issues to obtain a clean, plain text copy of the original keyword phrase:

  1. Find the domain name of the referring search engine.
  2. Look-up the query parameter name used by each search engine.
  3. Identify and extract the query value from the referring results page URL.
  4. Decode the URL encoded query to plain text.
  5. Clean the query to remove potentially malicious markup.
  6. Use the entrance keywords to set the style of the page.

premium content omitted

Sign up for premium content now Access all premium content for $50: sign-up below.
Can I use Javascript to get entrance keywords from a search engine?

Premium content subscription

Come inside, access hundreds of premium content answers. One payment grants life membership to hundreds of developer FAQs.

Premium Content: $50 life membership

Membership payment: $50

* You do not need a PayPal account to complete payment.

Your security

The PayPal service allows you to pay securely and independently in your own currency. Payments are billed to Metacentric Internet Limited. We never handle your credit card details.

Why pay for premium content?

Direct access to hundreds of answers to common Web development questions with full working examples and links to other Web resources. Your subscription provides full answers to all premium content questions including those listed below, plus:

Javascript FAQ: premium questions

Javascript browser FAQ: premium questions

Javascript "how to" FAQ: premium questions

Document Object Model FAQ: premium questions

Drop-down menus FAQ: premium questions

DOM menu customisation FAQ: premium questions

Add this page to your chosen social bookmarking service

Style warning, please read

Home · CSS · Java · Javascript · HTML · Help · Log