搜索引擎是否尊重HTTP标题字段“Content-Location”? [英] Do search engines respect the HTTP header field “Content-Location”?

查看:137
本文介绍了搜索引擎是否尊重HTTP标题字段“Content-Location”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道搜索引擎是否尊重 HTTP标头字段内容位置

I was wondering whether search engines respect the HTTP header field Content-Location.

这可能很有用,例如,当您要删除URL中的会话ID参数:

This could be useful, for example, when you want to remove the session ID argument out of the URL:

GET /foo/bar?sid=0123456789 HTTP/1.1
Host: example.com
…

HTTP/1.1 200 OK
Content-Location: http://example.com/foo/bar
…






澄清:

我不想重定向请求,因为删除会话ID会导致完全不同的请求,因此可能也会产生不同的响应。我只是想声明所附的响应也可以在其主URL下找到。


Clarification:
I don’t want to redirect the request, as removing the session ID would lead to a completely different request and thus probably also a different response. I just want to state that the enclosed response is also available under its "main URL".

也许我的例子不能很好地表达我的问题的意图。那么请看一下目的是什么HTTP标题字段Content-Location?

Maybe my example was not a good representation of the intent of my question. So please take a look at What is the purpose of the HTTP header field "Content-Location"?.

推荐答案

我认为Google刚刚宣布了我的答案问题: 规范用于声明规范网址的链接关系

I think Google just announced the answer to my question: the canonical link relation for declaring the canonical URL.

Maile Ohye 写道:



MickeyC说...

您应该使用Content-Location标头,如下所示:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

14.14 Content-Location

MickeyC said...
You should have used the Content-Location header instead, as per:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
"14.14 Content-Location"

@MikeyC:是的,从理论的角度来看是有意义的,我们当然也考虑过了。然而,有几点让我们选择:

@MikeyC: Yes, from a theoretical standpoint that makes sense and we certainly considered it. A few points, however, led us to choose :


  1. 我们的数据显示Content-Location标头配置不正确在许多网站上。有时,网站管理员会提供冗长,丑陋的网址,甚至不会重复 - 这可能是无意的。他们可能没有意识到他们的网络服务器甚至发送了Content-Location标头。

  1. Our data showed that the "Content-Location" header is configured improperly on many web sites. Sometimes webmasters provide long, ugly URLs that aren’t even duplicates -- it's probably unintentional. They're likely unaware that their webserver is even sending the Content-Location header.

与网站所有者联系以清理整个网络中的内容位置问题将非常耗时。我们意识到,如果我们从一个干净的平板开始,我们可以更快地提供功能。与微软和雅虎!为了支持这种格式,网站管理员只需学习一种语法。

It would've been extremely time consuming to contact site owners to clean up the Content-Location issues throughout the web. We realized that if we started with a clean slate, we could provide the functionality more quickly. With Microsoft and Yahoo! on-board to support this format, webmasters need to only learn one syntax.

网站管理员经常难以配置他们的网络服务器标头,但可以更轻松地更改他们的网页HTML。 rel =canonical似乎是一个友好的属性。

Often webmasters have difficulty configuring their web server headers, but can more easily change their HTML. rel="canonical" seemed like a friendly attribute.


http://googlewebmastercentral.blogspot.com/2009/02/specify -your-canonical.html?showComment = 1234714860000#c8376597054104610625

这篇关于搜索引擎是否尊重HTTP标题字段“Content-Location”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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