I see some time url has #! combination. What is the purpose of that ? & How it is useful. Can somebody elobrate on that.
相关问题
- UrlEncodeUnicode and browser navigation errors
- 反爬能检测到JS模拟的键盘输入吗
- 有没有方法即使程序最小化也能对其发送按键
- Improve converting string to readable urls
- Jasper: error opening input stream from url
When you see
#!
understand that this site is using Ajax. When you click a link it doesn't refresh whole page.Why do they use
#!
? After that sign they put the path of the page. If you are using old version of browser that doesn't support Ajax well, the script opens the page without Ajax.After the hash mark ("#") it is expected the ID of some X/HTML element in the page that has to be highlighted or scrolled to by the user agent. Valid HTML ID attributes cannot contain "!", so it is more or less guaranteed that whatever follows "#" here will not match any element in the page.
This trick is used to have many different URLs to the same page, and let a javascript in the page alter it by interpreting what comes after "#", possibly via AJAX. This has faster load times than if the user had to visit different pages. Also, it is bookmark and back button friendly.
http://code.google.com/web/ajaxcrawling/docs/getting-started.html
It's basically conforming to Google's ajax url standard. There is no magic behind it, but google wants sites to have consistent url patterns for ajax-powered sites.