是URL的锚部分被发送到Web服务器? [英] Is the anchor part of a URL being sent to a web server?

查看:439
本文介绍了是URL的锚部分被发送到Web服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我说,有一个网址 http://www.example.com/#hello

  1. 如果 #hello 的事情被发送到Web服务器或不按标准?
  2. 如何现代浏览器的行为?
  1. Should #hello thing be sent to the web server or not, according to standards?
  2. How do modern browsers act?

更新:请不要忽略第一个问题

Update: Please do not ignore the first question.

推荐答案

在回答这个问题是相似的答案/问题/ 774136。 基本上,根据标准@ faqs.org/rfcs/rfc1808.html(见第2.4.1节),它说:注意片段标识符不考虑URL的一部分。 作为stephbu中指出,在锚标记永远不会发送通过任何浏览器的HTTP请求的一部分,它是在浏览器内本地PTED只跨$ P $。

The answer to this question is similar to the answers for /questions/774136. Basically, according to the standard @ faqs.org/rfcs/rfc1808.html (see Section 2.4.1) it says: ""Note that the fragment identifier is not considered part of the URL." As "stephbu" pointed out, "the the anchor tag is never sent as part of the HTTP request by any browser, it is only interpreted locally within the browser".

这篇关于是URL的锚部分被发送到Web服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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