1. 程式人生 > >如何讓瀏覽器在訪問鏈接時不要帶上referer

如何讓瀏覽器在訪問鏈接時不要帶上referer

-c open http create segment new win cti without

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



參考鏈接:https://segmentfault.com/q/1010000000123441

如何讓瀏覽器在訪問鏈接時不要帶上referer