how i can make my pages show like grooveshark pages
http://grooveshark.com/#!/popular
is there a tutorial or something to know how to do this way for showing page by jQuery or JavaScript?
如何使页面显示为grooveshark页面http://grooveshark.com/#!/流行用jQuery或JavaScript来显示页面,有没有什么教程或方法可以让你知道?
1 个解决方案
#1
20
The hash and exclamation mark in a url are called a hashbang, and are usualy used in web applications where javascript is responsible for actually loading the page. Content after the hash is never sent to the server. So for example if you have the url example.com/#!recipes/bread
. In this case, the page at example.com would be fetched from the server, this could contain a piece of javascript. This script can then read from location.hash
, and load the page at /recipes/bread
.
url中的散列和感叹号被称为hashbang,通常用于web应用程序中,javascript负责实际加载页面。散列之后的内容不会发送到服务器。例如,如果你有网址example.com/#!recipe /bread。在这种情况下,example.com的页面将从服务器获取,这可能包含一段javascript。然后可以从位置读取该脚本。哈希,并加载页面在/食谱/面包。
Google also recognizes this URL scheme as an AJAX url, and will try to fetch the content from the server, as it would be rendered by your javascript. If you're planning to make a site using this technique, take a look at google's AJAX crawling documentation for webmasters. Also keep in mind that you should not rely on javascript being enabled, as Gawker learned the hard way.
谷歌还将此URL方案识别为AJAX URL,并将尝试从服务器获取内容,因为它将由javascript呈现。如果您打算使用这种技术创建一个站点,请查看谷歌的web管理员AJAX爬行文档。还请记住,您不应该依赖于启用javascript,正如Gawker所了解的那样。
The hashbang is being going out of use in a lot of sites, evenif javascript does the routing. This is possible because all major browsers support the history API. To do this, they make every path on the site return the same Javascript, which then looks at the actual url to load in content. When the user clicks a link, Javascript intercepts the click event, and uses the History API to push a new page onto the browser history, and then loads the new content.
hashbang在许多站点中都不再使用了,即使javascript执行路由。这是可能的,因为所有主要浏览器都支持history API。为此,它们使站点上的所有路径返回相同的Javascript,然后查看实际的url以加载内容。当用户单击一个链接时,Javascript将拦截单击事件,并使用History API将新页面推入浏览器历史记录,然后加载新内容。
#1
20
The hash and exclamation mark in a url are called a hashbang, and are usualy used in web applications where javascript is responsible for actually loading the page. Content after the hash is never sent to the server. So for example if you have the url example.com/#!recipes/bread
. In this case, the page at example.com would be fetched from the server, this could contain a piece of javascript. This script can then read from location.hash
, and load the page at /recipes/bread
.
url中的散列和感叹号被称为hashbang,通常用于web应用程序中,javascript负责实际加载页面。散列之后的内容不会发送到服务器。例如,如果你有网址example.com/#!recipe /bread。在这种情况下,example.com的页面将从服务器获取,这可能包含一段javascript。然后可以从位置读取该脚本。哈希,并加载页面在/食谱/面包。
Google also recognizes this URL scheme as an AJAX url, and will try to fetch the content from the server, as it would be rendered by your javascript. If you're planning to make a site using this technique, take a look at google's AJAX crawling documentation for webmasters. Also keep in mind that you should not rely on javascript being enabled, as Gawker learned the hard way.
谷歌还将此URL方案识别为AJAX URL,并将尝试从服务器获取内容,因为它将由javascript呈现。如果您打算使用这种技术创建一个站点,请查看谷歌的web管理员AJAX爬行文档。还请记住,您不应该依赖于启用javascript,正如Gawker所了解的那样。
The hashbang is being going out of use in a lot of sites, evenif javascript does the routing. This is possible because all major browsers support the history API. To do this, they make every path on the site return the same Javascript, which then looks at the actual url to load in content. When the user clicks a link, Javascript intercepts the click event, and uses the History API to push a new page onto the browser history, and then loads the new content.
hashbang在许多站点中都不再使用了,即使javascript执行路由。这是可能的,因为所有主要浏览器都支持history API。为此,它们使站点上的所有路径返回相同的Javascript,然后查看实际的url以加载内容。当用户单击一个链接时,Javascript将拦截单击事件,并使用History API将新页面推入浏览器历史记录,然后加载新内容。