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

前端 未结 10 1643
挽巷
挽巷 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:29

    I have implemented a simple but effective iframe solution using jquery.

    https://jsfiddle.net/skibulk/0oebphet/

    (function($){
      var f = $('