URL片段:在你的哈希的URL开头的斜杠' - 好还是坏? [英] URL fragments: a leading slash in your hash url - good or bad?

查看:413
本文介绍了URL片段:在你的哈希的URL开头的斜杠' - 好还是坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只需要知道它是否是一个好还是不要有在你的哈希网址一个斜线。例如,

Just need to know whether it is a good or not to have a leading slash in your hash url. For instance,

site.come/#/directore/file/

site.come/#directore/file/

我问这个,因为Backbone.js的不建议第一个选项中的文档(我个人preFER第一个选项...),

I am asking this because backbone.js does not recommend the first option in their docs (personally I prefer the first option...),

http://backbonejs.org/#Router-extend

请注意,你会希望避免在您的路线使用斜线
  定义

Note that you'll want to avoid using a leading slash in your route definitions

所以,我要确保是什么原因背后,你要避免使用斜线

So I want to make sure what the reasons are behind this that you want to avoid using a leading slash.

推荐答案

我觉得这两种方法都是不好的,如果网站应该是公开的,因为它会伤害搜索引擎优化。

I think both methods are bad if the website should be public, as it would hurt SEO.

Conisd​​er使用#!如谷歌的指示人做这样的网站是抓取

Conisder using #! as google instructs people to do so that the website is crawlable

这篇关于URL片段:在你的哈希的URL开头的斜杠' - 好还是坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆