I have a website running on a server in IIS6. The website is configured with two hostheader bindings on port 80:
So, in theory using a web browser to access either:
...should both show the exact same website in my browser.
However, when I use IE9 to view http://mywebsite1/, the UserAgent that the browser sends to the web server is this:
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+Trident/5.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+Tablet+PC+2.0;+MS-RTC+LM+8;+OfficeLiveConnector.1.5;+OfficeLivePatch.1.3;+.NET4.0C)
But when I use IE9 to view http://mywebsite2.mydomain.com/, the UserAgent that the browser sends to the web server is this:
Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0)
Why would IE9 send a different UserAgent string in these two situations? The browser is also emulating the rendering rules for these user agents, so this is causing nightmare CSS problems!
Additional info:
IE9 reports Mozilla/4.0 when in Compatibility View, did you click the "torn page" icon when viewing your http://mywebsite1/ ? (The view can also be requested by the html thats served.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With