码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-10-13 14:18:58      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:fun   erer   out   new   col   style   oca   win   blog   

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>‘);
 }

 

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

标签:fun   erer   out   new   col   style   oca   win   blog   

原文地址:http://www.cnblogs.com/ningmeng666/p/7660366.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!