Search code examples
javascriptjqueryreferrerreferrals

How can I detect rel="noreferrer" support?


Is there any way I can detect the support for rel="noreferrer" with Javascript?

<a href="http://example.com" rel="noreferrer">link without referral</a>

Solution - $.browser is deprecated, and it may be moved to a plugin in a future release of jQuery.

var is_webkit = $.browser.webkit;
if(is_webkit) {
    alert('supports rel="noreferrer"');
}

Solution

  • No, there is none. Referrer headers are outside the domain of JavaScript.

    If it's particularly important, you could check whether the browser (navigator.userAgent) is one known to support or not support noreferrer.