A: 

"but I am not sure". You should, perhaps, read the appropriate standards. http://faqs.org/rfcs/rfc1738.html for example.

You also need to read this: http://w3.org/Provider/Style/URI

Are those two forms of "URL" trully different URL in the perspective of search engines?

There's no generic "search engine". Each is unique. You have to make a list, and then ask each vendor whether or not query string matters. Google, for example, will not tell you anything about their search engine. Others might.

Read the Definitions in the provided links. The query string isn't part of the URI. But a search engine might use it. Or might not. There's no general answer that applies to all search engines.

have to do some thing to inform search engines this situation, then what should I do?

There's no generic "search engine". Each is unique. Google, for example, will not tell you anything about their search engine. Others might.

Some retain the 301/302 information. Some don't.

search engines toss two of the url out of their database?

There's no generic "search engine". Each is unique. Google, for example, will not tell you anything about their search engine. Others might.

Some might work on the URI without the query string. Some might work on the URI with the query string.

Here's the important point.

There's no generic "search engine". Each is unique.

Rather than worry about "search engines". Read the http://w3.org/Provider/Style/URI link and design your URI's correctly. That's the absolute best you can do.

S.Lott
Downvoted, I don't think the first link is particularly relevant, and the second one might be relevant but it's hard to immediately see how. (Providing explanation for downvote).
Noon Silk
+2  A: 

Yes, both URLs are viewed as separate. The best way in this situation is to notify the search engines that the ?tab=1 url is a duplicate by using the rel="canonical" attribute within the link tag.

Google's Webmaster Blog has an article on how to use it: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

However, if the content on ?tab=1 is actually unique, you might have a different problem on your hands.

Say your site is about cars, and your foo.html page is about Porches. If ?tab=1 is about the special alloy rims that come standard with the Porche, a searcher looking for "special alloy rims" will land on your foo.html page, then not find any information about the rims because it's hidden behind the tab, and then bounce. This is not a good user experience and could potentially impact your conversions.

What you might want to consider is telling the search engines how to crawl and index your javascript tab appropriately.

Google has instructions on how to make AJAX pages crawlable: code.google.com/web/ajaxcrawling/docs/getting-started.html

This way your content gets crawled and indexed correctly, and users arrive at your site will see what they were searching for.

note: AJAX crawling is currently specific to Google. It's not clear whether Bing/Yahoo is or will be supporting this proposed solution.

phaithful