Created
December 20, 2016 18:28
-
-
Save drewsberry/578fc6e414ff7ea93e0234fd8898f8f3 to your computer and use it in GitHub Desktop.
Set referrer header in JS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://stackoverflow.com/a/23434948 | |
function setReferrerHeader(referrerName) { | |
Object.defineProperty(document, "referrer", { | |
get: function () { return referrerName; }, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ir works for all browser?