开发者

Ajax url segments with jquery using AJAX crawling scheme

I am researching how to approach loading content with ajax for m开发者_Go百科y web application

I notice twitter are using the google AJAX crawling scheme: (http://code.google.com/web/ajaxcrawling/)

but instead of: http://twitter.com/who_to_follow#!key=value

they are using something like: http://twitter.com/#!/who_to_follow/suggestions

How would I handle segments instead of #key=value in a ajax request with jquery?

any help/advice is much appreciated Jon


You can use the DOM window object to load the full hash fragment:

q = window.location.hash.substring(1);

q would contain everything on the right side of the hash. You can then split q on '/' and reference the result partitions as an array. There are code examples for this here: http://goo.gl/0lJ0J

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜