我应该使用#还是#!

I am doing some ajax page with jQuery, can you tell me which are the differences (especially for SEO point of view) between pages like:

  • page.html#option1
  • page.html#!option1

Edit: mh maybe the second options is google-friendly

Thanks

You should use #! if you want your site crawlable by Google. More information is found on their Getting Started guide. So yes, the second version is more SEO-friendly. Another post worth reading is Googles propsal for making ajax pages crawlable.

However, for a users point of view, there's no difference.

Just a tip, sammy.js is a great library for working with this. It allows you to define routes using hash fragments.