I've built my entire site using AJAX (indeed it's GWT). I've also implemented AJAX moving suggested by Google. However, following the implementation, I discovered that neither Yahoo , Bing, nor Baidu implemented that plan!
I am wondering if there's a method to identify the net client is really a search robot. If they're, they'll be proven the HTML snapshot I produced.
It will likely be best basically can identify them in APACHE level, i quickly can just perform a mod_rewrite. But it is still ok basically can perform that in PHP or GWT.
The correct answer is tricky as you will find a wide variety of search engines like google. I suppose this can not be completed in a 1 lining. If PHP is alright, I would recommend using php_browscap.ini (readily available for different languages). This can be with PHPs get_browser()-function, for instance.
You'll be able to check against various different browser stuff not to mention Bots.
During my own code clips I personally use the next function (in line with the pointed out browscap) to find the appropriate infos easily during my code:
function _browser($a_browser = false, $a_version = false, $title = false) opera konqueror safari netscape navigator opera variety lynx amaya omniweb chrome avant camino flock seamonkey america online mozilla gecko' $user_browser = strtolower($_SERVER['HTTP_USER_AGENT']) $this_version = $this_browser = '' $browser_limit = strlen($user_browser) foreach ($this->_w($browser_list) as $row) if ($a_browser !== false) amplifier&lifier !empty($this_version)) return $ret // $this_platform = '' if (strpos($user_browser, 'linux')) elseif (strpos($user_browser, 'macintosh') strpos($user_browser, 'mac platform x')) else if (strpos($user_browser, 'windows') strpos($user_browser, 'win32')) if ($title !== false) return array( "browser" => $this_browser, "version" => $this_version, "platform" => $this_platform, "useragent" => $user_browser ) function _w($a = '')
/* // Good examples echo '<pre>' print_r(_browser()) // return variety of browser data var_dump(_browser('firefox')) // return true if using opera var_dump(_browser('msie', '>= 7.0')) // return true if using IE 7. or over else false var_dump(_browser('firefox', '< 3..5')) // return true if using below opera 3..5 (can check minor version) var_dump(_browser(false, false, true)) // return string of title of browser and version // To see if Gecko browser can be used var_dump(_browser('gecko')) // version_in comparison function can be used to help you make use of the same operator syntax var_dump(_browser('firefox', 'le 1.5')) echo '</pre>'
To get it done with Apache use a
rewriteRule plus a
The RewriteCond accepts RegExp, so you've to make use of a pattern there, which fits all individuals bots(you need to find informations building the pattern around the page linked by acme).
But be cautious: Search-engines may penalize pages that deliver different contents towards the bots and also to others clients.