What is the most reliable way to hide / spoof the referrer in JavaScript?

前端 未结 10 1644
挽巷
挽巷 2020-11-28 03:13

Normally, the referrer is traceable through:

  • JavaScript\'s document.referrer
  • The request headers, e.g. PHP\'s $_SERVER[\'HTTP_REFER
10条回答
  •  爱一瞬间的悲伤
    2020-11-28 03:42

    There is a cross browser solution in Javascript that removes the referrer, it uses Iframes created dynamically, you can take a look to a proof of concept ( disclaimer: it uses a little JS library I wrote ).

提交回复
热议问题