Orkut's URL Writing Method

▼魔方 西西 提交于 2019-12-11 04:49:49

问题


I have a doubt about orkut's new URL Writing method.

Earlier the home page was like

http://www.orkut.com/Home.aspx

Now its changed to

http://www.orkut.co.in/Main#Home.aspx

Whats the significance of "#" ? Why is it there and why have they used it?

Is not "#" used to navigate to a particular section of Page using name="blah" in the anchor tag?


回答1:


The URL fragment (#name) was historically used for in-page anchors, so that you could mark a section and have the page scroll just the right content into view when linking to it.

Since the URL fragment can also be seen by JavaScript code, though, many hacks have become popular that allow you to use the same page for multiple purposes. It's probably more useful for browser history than making any sort of presentation decisions, but both techniques are common.




回答2:


They're probably using it in their Javascript. Often ajax heavy pages use the # so that bookmarks and browser back buttons still work.



来源:https://stackoverflow.com/questions/502228/orkuts-url-writing-method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!