IE 10 send different user-agent header to same page on different domain, one domain is resolved from hosts file

StackOverflow https://stackoverflow.com/questions/16881088

Question

I have a browser identification web page. On that page, the visitors will be asked to modify their hosts file, and add a fake domain and address entry in it.

When IE 10 user using the normal domain (resolved from DNS server) to visit the page, the server got user-agent like the following

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)

When using the fake domain to visit the page, the server got user-agent like the following

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.2; WOW64; Trident/6.0)

Because the identification logic need these two user-agent values to be identical, so IE 10 can't pass the identification.

I thought it maybe related the page content which may cause IE 10 use different mode to render the page, but then I realize it shouldn't, because when browser send HTTP request, it does not get response yet.

So, what's the possible reason?

Was it helpful?

Solution

It looks like the "Download updated compatibility list from Microsoft" option & the fake domain caused this behavior together

Turn the option off, then IE 10 does not identify itself as IE 9 for the fake domain anymore.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top