Adding meta “viewport” for WordPress

Google recently changed their search algoritms to better recognize and weight “Mobile” support. This term is loosely defined in general, but to get your Google search “juice” you simply need to add a “viewport” meta tag. Unfortunately, unless you have the knowledge and want to edit your WordPress theme manually, there’s not an obvious way to add this.

Adding the “Definitely Allow Mobile Zooming” plugin makes this painless in WordPress without any additional configuration.

HTML code required (in <head>):

<meta name="viewport" content="width=device-width" />

PHP required (for manual addition):

function set_viewport() {
<meta name="viewport" content="width=device-width" />
add_action('wp_head', 'set_viewport');


Yandex Search Engine

While “Google” may be ubiquitous with “search” for most users in the United States and much of the world, there are still several other strong contenders that many people know nothing about. One such example, from Russia, is Yandex.

Getting your website indexed by this search engine is easy.

  1. Visit the webmaster website at
  2. Register for an account, you can use single-sign-on from many social media websites such as Facebook, Google or Twitter.
  3. Click “Add Site” or “Add URL”
  4. Enter your domain name and submit
  5. There are several methods provided, easiest to implement is usually ‘txt’ file, as you can execute a Linux/Unix command line “touch” to create the empty file on the server as needed.
  6. Verify that your site is now linked to your account
  7. Site indexing can take a while, if it is not already indexed, in the meantime you can now modify some information about your domain(s).


Revisit-After meta tag

Once in a while I’ve seen this tag in the HTML source of older websites, I too had implemented it at one time, but forgot the reason. Here’s what I’ve turned up, and as such have removed it universally.

This tag was at one time used by one small search engine in Vancouver Canada, it was never picked up by the larger search organizations and as such has very little relevance.

<meta name=”revisit-after” content=”7 days” />



OpenSearch is a relatively obscure topic that I’ve only crossed a few times, here is the premise.

A simple tag can be added to your content, in this case HTML, but a feed can also contain this element.

<link rel="search" href="" type="application/opensearchdescription+xml" title="" />

That link refers to a file that resembles the one below, in it you can specify the URL to the search facilities on a website, or as in the case below, use the parameters for a Google search of your website.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE OpenSearchDescription>
<OpenSearchDescription xmlns="" xmlns:moz="">
<Description>Use Google to search our web site.</Description>
<Tags>giantgeek skotfred</Tags>
<Contact>[email protected]</Contact>
<Image width="16" height="16" type="image/x-icon"></Image>
<!-- NOTE: this uses Google, you can give your own search url instead -->
<Url type="text/html" method="GET" template=" {searchTerms}"/>
<Url type="application/opensearchdescription+xml" rel="self" template=""/>

Many modern browsers that provide a ‘search box’ in the browser interface, can then add the capability to perform a search of your website even when the user is not there already.

REFERENCES and Additional Reading:

Prevent Robots from indexing portions of content

Yahoo! initially introduced a CSS class that can be used to notify robots/spiders that a specific section or fragment of content should not be included for search purposes.



Link ‘canonical’ tag

This tag is applied to the page to define the preferred URL to be stored in most search engines, and reduces the odds that heuristics will be used and leave you will multiple listings of duplicated content (example: vs.

It can also be applied so that the URL’s exposed by search engine results do not expose the underlying technology such as PHP/JSP/ASP in the filenames)
<link rel="canonical" href="" />

HTML5 INPUT placeholder text

One of the great improvements for forms in HTML5 is the ability to display placeholder text in your INPUT fields. Traditionally, this has required developers to add a variety of JavaScript methods to dynamically update the field, now (for browsers that support it) you can use a simple attribute on your tag elements.

<input type="text" value="Search" onfocus="if(this.value == 'Search'){this.value = '';}" onblur="if(this.value == ''){this.value = 'Search';}" />

<input type="text" value="" placeholder="Search" />


Masquerading browser User-Agent strings

As it’s Halloween, it’s only relevant that I share a method of covering your browsers identity.

  • For MSIE, you must modify the registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent]
  • For Chrome (on Windows, and I assume other OS’s), you can use a startup parameter.
    C:\Users\{USERID}\AppData\Local\Google\Chrome\Application\chrome.exe --user-agent="Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7_0; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
  • For Firefox and other Mozilla based browsers, you can mofiy the configuration in (user.js) or use a variety of add-on extensions, such as:

Interested in knowing your current User-Agent, just visit one of the following:

Many robots and spiders that are used by search engines also identify themselves by their User-Agent, if you see this activity in your logs you can often learn more about it at:


Happy Halloween!