Hashbang slash or without a slash?

Should we do site.com/#!/blogor site.com/#!blog?

I understand that there is no real difference, however, there should be a standard standard as a community of website developers so that users can easily remember the URL. If there is no standard already established, ideally, someone will send an answer in favor of one, and someone will send another in favor of another, and one will receive more votes than others ...

Personally, I prefer: site.com/#!blogsimply because it is shorter. However, I saw that many other sites use a different option.

By the way, if your first instinct is to instruct us not to use hashbanks, then this question is not for you, please leave us alone.

+5
source share
4 answers

You forgot the third option site.com#!blog.

If you want to get all semantic, the question will be "what does the" / "in the url mean?"

  • Is it a physical directory? [site.com#!blog]

When navigating the file system, folders are separated by a slash. This is a natural behavior on the Internet, but routing has changed that.

  • Is this a hierarchy of content? [site.com/#!blog]

Exit the entered content hierarchy. Instead of question marks and ampersands, the vars query was separated by a slash, creating a deep link structure based on how developers felt. Important information.

  • Does this separation context in your url? [site.com/#!/blog]

- , . URL : [ http://stackoverflow.com/questions/5414972/hashbang-slash-or-no-slash/]. , 5414972. 5414972, . , , , , . , , , . , url :

url prefix > ajax crawling notation > the specific page

url prefix > ajax crawling notation and the specific page.

, "" ( , ), . , , , .

"", , . "", ""?

+10

ant: , .

site.com/#!/blog , site.com/#!/blog/latest, site.com/#!/blog/archive/october - .

€ 0,014185.

+5

, . , root/, /#!/Blog. , .. .

, . , , mod_rewrite: - , URL-, .

, , , hashbangs: http://code.google.com/web/ajaxcrawling/

+4

- . , "" "#" ("") ("#"), : , .

var tokens = window.location.hash.split("/").shift();

tokensbecomes an array of markers with [#]! already out of the way. Especially handy when you use a slash token hierarchy in your hashes.

But, of course, you should still check for the token lacking to make sure it has a valid hashbang.

+4
source

All Articles