问题描述
好吧,我一直致力于在子域之间进行基于用户代理的共享会话保护。
Well, I've been working on an User-Agent based shared-session protection between subdomains.
我非常惊讶它在IE 11之前一直运行良好预览最近发布。有2个子域名
I was extremely surprised that it's been working well until IE 11 preview was released recently. There are 2 subdomains
example.com 和 sub.example.com
我拦截了对这两个域的请求,似乎发送到每个域的USER-AGENT HTTP Header似乎不同。
I've intercepted requests to both domains and it seems that USER-AGENT HTTP Header being sent to each domain is different.
请求示例.com有:
对sub.example.com的请求有:
Request to sub.example.com has:
你知道这种奇怪的动态行为是什么原因吗?
Do you have any idea what is the reason for this strange dynamic behavior?
推荐答案
微软已将该网站配置为使用UA欺骗(通过公司mpatibility查看列表)并导致IE发送自定义UA字符串。
Microsoft has the site in question configured to use UA-spoofing (via the Compatibility View list) and that causes IE to send a custom UA string.
2008年在IE8中启用了基于CompatView的UA欺骗:
CompatView-based UA spoofing was enabled in IE8 in 2008:http://blogs.msdn.com/b/ie/archive/2008/08/27/introducing-compatibility-view.aspx
在IE10 +中,它变得更加丰富,每个网站都有欺骗手段以获得最佳体验。参见用于探索该主题。
And in IE10+, it's gotten richer, with per-site spoofing to enable the best experience. See http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx for an exploration of this topic.
这篇关于IE 11将不同的User-Agent标头发送到不同的子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!