Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebBrowser Control IE8 Compatibility Mode On/Off Switch

I am having a IE8 compatibility issue while using the WebBrowser control to navigate to a website. The strange thing is sometimes the website works, but more than likely it wont. I can refresh the page sometimes and it works as well.

Just going to the page in IE8 I experienced the same CSS rendering problems so I switched to compatibility mode and it refreshed and rendered correctly.

Is there a way to simulate this effect for the WebBrowser control. I want to be able to click a button and toggle the modes off and on like you can do in Internet Explorer.

Is this possible? If so, anyone know how?

Thanks

like image 206
VsFox Avatar asked Jan 13 '10 08:01

VsFox


2 Answers

Would this post on IEBlog about WebBrowser rendering modes and IE8 help? Seems like you have to set the rendering mode specific to your application using a key in the registry.

like image 119
Anders Fjeldstad Avatar answered Nov 23 '22 10:11

Anders Fjeldstad


I know the registry entry answer has been posted, so I thought I'd offer an alternative.

Do you own the site and have permissions for the server it runs on? If so, you can set the X-UA-Compatible header to be sent for every page on the site/server. See http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx#Servers for information plus links for Apache/IIS7.

like image 34
Andy E Avatar answered Nov 23 '22 11:11

Andy E