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