如何让浏览器在访问链接时不要带上referer


我们在从一个网站点击链接进入另一个页面时,浏览器会在header里加上 Referer 值,来标识这次访问的来源页面。但是这种标识有可能会泄漏用户的隐私,有时候我不想让其他人知道我是从哪里点击进来的,能否有手段可以让浏览器不要发送 Referer 呢?

我试过用 window.location.href='...' 来跳转,也还是有 Referer 。大家有什么好办法吗?

http referer 浏览器

calve 11 years, 2 months ago
function open_without_referrer(link){
document.body.appendChild(document.createElement('iframe')).src='javascript:"<script>top.location.replace(\''+link+'\')<\/script>"';
}

如果如果是新窗口打开,可以使用如下代码:

function open_new_window(full_link){ 
    window.open('javascript:window.name;', '<script>location.replace("'+full_link+'")<\/script>');
 }
-凉_生- answered 11 years, 2 months ago

Your Answer