LDNDeveloper

Andrew Pallant

Software & Web Developer


Donate To Support My Blog Donate if this post helped you. Coffee money is always welcomed!




How to change IE11 Useragent

Physical Link: How to change IE11 Useragent


I recently tripped on a need to change the Useragent string for IE11 because of an older DotNet control that I was using and was no longer in development. Again this is not my solution, but it worked for me and I thought I would share it with the world. Since it is not my solution, here is the original link [ Answer ]

 <rewrite>  
 <rules>  
 <rule name="Change IE 11 User Agent to IE 10" enabled="true">  
  <match url="(.*)" />  
  <action type="None" />  
  <conditions>  
   <add input="{HTTP_USER_AGENT}" pattern=".trident\/[789]" />  
  </conditions>  
  <serverVariables>  
   <set name="HTTP_USER_AGENT" value="Mozilla/5.0 (compatible; MSIE 11.0; Windows NT 6.2; Trident/7.0)" />  
  </serverVariables>  
  </rule>  
  </rules>  
 </rewrite>  

To make this work, you need to add the variable “HTTP_USER_AGENT” to the rewrite module in IIS.  If you do not, you will be told to by the error returned in IIS.  For instructions for adding the variable click the following:  [ link ]

The post How to change IE11 Useragent appeared first on LDNDeveloper.

Author:
Categories: Developement, DotNet, Web, IE11


©2024 LdnDeveloper