图像标签src-attribute:会话因移动连接而丢失 [英] Image tag src-attribute: Session lost with mobile connection
问题描述
我使用< img>
标记和src属性,该标记指向从非公共文件夹加载图像的脚本.当我通过移动连接测试我的网站时,scr-attributes路径从 src ="http://example.com/get_image.php
更改为 src =" http://1.1.1.1/bmi/example.com/get_image.php
,我想这与我的移动互联网提供商有关.问题是,提供图像的脚本无法再识别传入请求的会话.在非移动WIFI连接上,src-attribute不变,一切正常,并找到了会话.
I use an <img>
tag with an src-attribute pointing to a script that loads the image from a non-public folder. When I test my website with a mobile connection, the scr-attributes path is changed from src="http://example.com/get_image.php
to src="http://1.1.1.1/bmi/example.com/get_image.php
, I guess that has something to do with my mobile internet provider. The problem is, the image-providing script cannot identify the session of the incoming request anymore.
On a non-mobile WIFI connection, the src-attribute is not changed, everything works as expected and the session is found.
推荐答案
使用 Cache-Control:no-transform
标头发送我的页面至少可以解决我的移动提供商的问题.在CBroe的提示之后,我在这里找到了解决方案: http://stuartroebuck.blogspot.de/2010/08/official-way-to-bypassing-data.html
Sending my pages with a Cache-Control: no-transform
header did the trick, at least for my mobile provider. I found the solution after CBroe's hint here: http://stuartroebuck.blogspot.de/2010/08/official-way-to-bypassing-data.html
我很好奇这如何适用于其他移动公司...
I am curious how that applies to other mobile companies...
这篇关于图像标签src-attribute:会话因移动连接而丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!