I need to programmatically get the User-Agent of my browser: IE10 on windows 7.
That should be an easy job. I tried navigator.userAgent in javascript and HtmlPage.BrowserInformation.UserAgent in Silverlight and both of them return:
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0E; InfoPath.3; .NET4.0C)
,which looks nice. However, as I noticed by Fiddler, the real UA IE10 is sending when browsing websites is:
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
,which is a shorter version. How can I get this shorter string that IE10 is using?
(I have Firefox 19 installed and Firefox doesn't have this problem, user-agents of two approaches are the same.)
Thanks,