在javascript中更改http referer [英] Changing the http referer in javascript

查看:101
本文介绍了在javascript中更改http referer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张图片

<image src="blah.com/image.gif"/>

。当图像加载时,有没有办法将http referer更改为X,以便src主机看到来自X的图像请求的http引用?

. when the image loads, is there a way to change the http referer to X so that the src host sees the http referer of the image request coming from X?

推荐答案

无法更改图像请求加载的引荐来源,但可以删除引荐来源。

It's not possible to change the referrer of an image request load but is possible to remove the referrer.

有一个跨浏览器解决方案Javascript,它使用动态创建的iframe,检查概念验证(免责声明:它使用我为此目的编写的一点JS库。

There is a cross browser solution in Javascript, it uses Iframes created dynamically, check a proof of concept ( disclaimer: It uses a little JS lib I coded for that purpose).

这篇关于在javascript中更改http referer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆