外部ページに移動するときに リファラー(HTTP_REFERER)をサーバに送りたくない時があります。そんなときは次のやり方で行けます。
動作サンプルはこちら
https://pgmemo.tokyo/data/filedir/569_1.html
<a href="data:text/html;charset=utf-8,%3Chtml%3E%0D%0A%3Cscript%20%3E%0D%0Alocation.replace(%22http%3A%2F%2Fwww.teria.com%2F~koseki%2Fmemo%2Freferrer%2Fview.php%22)%3B%0D%0A%3C%2Fscript%3E%0D%0A%3C%2Fhtml%3E%0D%0A">リファラ消し</a>
<a href="javascript:document.open();document.write('<meta http-equiv=\'refresh\' content=\'0;url=http://taruo.net/e/\'>');document.close();">3. リファラ消し</a>
ただしOperaではうまく動作しません。
その場合苦肉の策としてGoogleを経由するという方法を使います
<a href="http://www.google.com/url?q=http://taruo.net/e/">4. リファラ消し(Using Google)</a>
<a href="http://taruo.net/e/" rel=noreferrer>5. リファラ消し</a>
https://pgmemo.tokyo/data/filedir/569_3.js
これを jquery_kill_referrer.js という名前で保存して
jQueryとともに読み込ませます(jquery.jsは各自用意してください)
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery_kill_referrer.js"></script>
読み込ませるだけで、そのページ内の外部リンク全てにreferrerを消す処理を付け加えます
(ただしOperaは未対応)