Image tag src-attribute: Session lost with mobile connection

孤街浪徒 提交于 2019-12-12 04:49:44

问题


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.


回答1:


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...



来源:https://stackoverflow.com/questions/45459249/image-tag-src-attribute-session-lost-with-mobile-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!