Is the anchor part of a URL being sent to a web server?

后端 未结 3 1241
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 02:02

Say, there\'s a URL http://www.example.com/#hello

  1. Should #hello thing be sent to the web server or not, according to standards?
3条回答
  •  难免孤独
    2020-12-02 02:19

    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 anchor tag is never sent as part of the HTTP request by any browser, it is only interpreted locally within the browser".

提交回复
热议问题