Url fragment and Referer header

前端 未结 3 2006
青春惊慌失措
青春惊慌失措 2021-01-11 15:02

Imagine you are on a page whose URL has a fragment (the part after the #), and click a link to go to another page. Most browsers will send the URL of the origin

相关标签:
3条回答
  • 2021-01-11 15:55

    The spec says basicly that you can do whatever you want - it is an optional header, i just tested webkit ignores the fragment, as do firefox and IE.

    0 讨论(0)
  • 2021-01-11 15:57

    The spec says that Referer can't include a fragment identifier (per ABNF). See RFC 2616, Section 14.36.

    0 讨论(0)
  • 2021-01-11 16:00

    I saw the same behavior in IE today. I am using IE 11.0.9600.17801 and upon inspection i found out that the 'Referer' header contains this fragment identifier.

    Referer: //abc:8080/myapp/ver/index.htm#search-basics

    Although I am quite certain that I have seen this behavior on and off with the same browser.

    0 讨论(0)
提交回复
热议问题