How to enhance SEO in an Ajax application

Before we started to discuss on this topic, I assume that you should be already familiar with how the Ajax applications work. Hence, this article was written merely for showing us that it’s possible for not sacrificing the SEO(i.e. Search Engine Optimization) in a web application that uses Ajax for enhancing it’s user-friendliness. Of course, there would be more works involved for implementing the SEO in an Ajax application.

Let says we has implemented Ajax in a news portal site. Then, your codes for getting the news details through Ajax would probably like:
<a href=”javascript:getNewDetailsByAjax(1);” >News item 1</a>
<a href=”javascript:getNewDetailsByAjax(2);” >News item 2</a>
<a href=”javascript:getNewDetailsByAjax(3);” >News item 3</a>

It’s nothing wrong with the codes shown above; but it’s certainly not search engines friendly. Because the search engines will not index those “links” like “javascript:getNewDetailsByAjax(1);”, “javascript:getNewDetailsByAjax(2);” and “javascript:getNewDetailsByAjax(3);”. It’s simply because such “links” aren’t URLs. Furthermore, as all of the news items might share the same <title>page title</title>, the search engines might most likely to index only a single page(if there is any page being indexed).

Ok, without considering about Ajax at the first place, the solution for handling the SEO issues as stated above might look like:
<a href=”http://www.example.com?id=1&type=details” >News item 1</a>
<a href=”http://www.example.com?id=2&type=details” >News item 2</a>
<a href=”http://www.example.com?id=3&type=details” >News item 3</a>

Read the entire entry »

February 26th, 2009 @ 12:10 AM • Filed under General

In linux vi command, how can I perform a global search and replace?

February 10th, 2009 @ 04:56 PM • Filed under Linux

Password protect a web directory using .htaccess

January 19th, 2009 @ 10:56 AM • Filed under Apache

Set up a name-based virtual host in Apache Web Server

January 16th, 2009 @ 04:25 PM • Filed under Apache

How to install Webmin on CentOS

January 2nd, 2009 @ 05:24 PM • Filed under Webmin

Linux command line - How to get and set the date and time of system.

December 23rd, 2008 @ 02:29 PM • Filed under Linux

How to configure the NFS Share on CentOs

November 20th, 2008 @ 07:54 PM • Filed under Linux

CakePHP conventions

September 28th, 2007 @ 10:53 AM • Filed under CakePHP

File system attacks in a share hosting environment

August 6th, 2007 @ 03:52 PM • Filed under Php

PHP security exploit with GIF images

June 22nd, 2007 @ 04:29 AM • Filed under Php