we have requirement of always opening website in IE8 browser mode (not IE8 document mode) i.e if default browser is IE10 our site should open in IE78 browser mode. I tried this code;
Response.AddHeader("X-UA-Compatible", "IE=8");
in global.asax file but it seems to change browser document mode and not browser mode. Can we change it using vbscript because we have a plugin written in vbscript that changes some of the settings of IE ?
Thanks
Here is the relationship:
Creator Created
server document
users browser
Servers can control the document mode via scripts, because they host documents.
Users can control the browser mode via the registry, because they install the browser.
References
How to enable Developer Tools always ON in IE
Is there a way to set Quirks Mode by default in IE10 running 64bit
Can I force IE9 *from the user side* to operate in quirks/standards mode?
Related
I am currently working with a classic ASP web application. What I'm wondering about is how it knows which browser to launch, I've looked over everything and am unable to find anywhere that it says to Launch Firefox in order to open the application. If i have firefox uninstalled, then it launches Chrome, however, when I hvae both Chrome and Firefox, then Firefox launched even if I have Chrome set as my default browser. Anyone have an idea?
your asp code has no connection whatsoever with what browser is used, it's browser independent. in order for you web app to run, you must open a browser FIRST, then go to the url of your web app, which will then fire off the asp code. It would be a huge security issue if i went to a web site, and it decided to open a different browser on my computer!
if you want to set Chrome as your default browser, follow these instructions:
https://support.google.com/chrome/answer/95417?co=GENIE.Platform%3DDesktop&hl=en
for firefox - https://support.mozilla.org/en-US/kb/how-change-your-default-browser-windows-10
for IE - https://support.microsoft.com/en-us/help/17435/windows-internet-explorer-make-default-browser
Your default browser is a different setting than the "open this file type with this program" setting. If double-clicking an .asp file opens in Firefox, then that's the latter type of setting.
To change it, right-click an .asp file, choose the "Open with >" option, then "Choose default program...".
That all said, 99.999% of users will never have occasion to double-click an .asp file, because most of us don't use web servers as our normal everyday computers.
How can I configure powershell command's to use either chrome or mozilla as default browser? My current default program is using IE as default.
The reason behind is in azure cloud if i'm using internet explorer I can see content from the website listed is blocked by IE due to security configuration,
I am working on an intranet website within a corporate company where there is the Internet Explorer 8 (running on Windows XP, so cannot upgrade to IE9) used as a standard (and the only one) browser and I am dealing with the Compatibility View Mode feature. The website is based on ASP.NET 2.0 and the web server is Windows Server 2003 with IIS6.
It is not possible to switch to any other browser because some other critical third party web based applications require Internet Explorer (and ActiveX) to run properly.
I would like to ask whether there is a way how to (programmaticaly, using a http header ...) override the Internet Explorer's browser mode in case the Compatibility View Mode is turned on for Intranet websites by default or, in other words, how to force the Internet Explorer to use the IE8 Browser Mode rather than the IE8 Compatibility Mode.
I have tried to add the X-UA-Compatible http header set to IE=Edge (or IE=8) in the IIS configuration but it only affects the Document Mode, never the Browser Mode.
Thanks for any help.
Browser mode refers to the user-agent string and, IIRC, it controls the UA string that's sent to a server during HTTP negotiation. The only documented way to control that is to use the F12 developer tools.
You may want to look at Enterprise Mode[1] (EMIE), supported for Win 7 and later. When EMIE is enabled for IE, IE11 behaves and acts like IE8. This includes the UA String.
You are correct, x-ua-compatible controls only the document mode. There was a feature control key (FEATURE_BROWSER_EMULATION [2]) that might've helped, but it's unclear whether that's still supported in current versions of IE. (See the Extensibility Improvements link on that page for technical details.)
Hope this helps...
References:
[1] - http://technet.microsoft.com/en-us/library/dn640687
[2] - http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx#browser_emulation
How is that possible?
http://img191.imageshack.us/img191/7080/wtfsg.jpg
Any solution to separate IE8 from IE7?
To quote this article on IEBlog:
IE8 will send the “MSIE 7.0” version information when viewing sites with Compatibility View enabled. (...) A new “Trident” token in the User-Agent string allows your code to detect Internet Explorer 8 clients even when they are using the Compatibility View feature.
To wit, your page is displayed in Compatibility mode, hence the UA change.
In this case you need to check from your developer toolbar if you are rendering your site as IE7.
You can get to the developers toobar by hiting F12 and checking the browser mode and puting it to IE 8.
How can I determine which is the default browser in my system programatically. The code must be developed using vc++
Is there any API for this ?
Where in the registry is the default browser value stored?
TL;DR: If HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\ exists read that; otherwise read HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\.
After reading the answers here I found little concensus on how to detect the default browser so I did some experiments and research to figure it out. I downloaded the Firefox source, wrote a script that reads a bunch of registry entries and also ran Process Explorer all while changing the default browser over and over.
I found there are a lot of registry keys that Firefox and Chrome change when each sets itself as the default browser. I believe Safari and Opera are both similar in behavior. IE appears to change only one of the registry keys I was watching.
What I found was that while most browsers change other registry paths, all browsers change HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\ (default)
Here are the registry value from the registry key HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\ (default) while each browser is the default browser.
IE 9.0.8112.16421: IEXPLORE.EXE
Chrome 21.0.1180.60 m: Google Chrome
Firefox 10.0.2: FIREFOX.EXE
Safari 3.2.2: Safari.exe
Opera 12.01: Opera
Tested on Microsoft Windows 7 Home Premium SP1 64-bit
Edit:
I found on a fresh install of Windows XP SP3 HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet\ does not exist. In this case you should read the default browser from HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\. I suspect this is also the case on fresh installs of other versions of Windows.
Addendum:
The ShellExecute method is a great solution if all you want to do is open a web page in the default browser. However, if you want to, for example, install an extension in only the default browser, ShellExecute does not solve the problem.
You normally do not need to know this. ShellExecute(0,0,"http://stackoverflow.com",0,0,SW_SHOWNORMAL); will do the trick. Windows will spot the http:// and figure out from there that you want to open a URL. The "default" webbrowser is pretty much defined as the webbrowser used by Windows for this task.
It's not just http:// which is supported. ShellExecute can start the default webbrowser with https:// URLs as well. For mailto: URLs, it starts the default mail client.
you can find the default browser in the registry
i.e. for Windows XP and Vista is located at
HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\
As its name suggests, StartMenuInternet is for registering a Web browser onto the Start Menu (and it only applies to XP and Vista, it is deprecated starting with Windows 7). That does not necessarily establish the browser as the default browser for the entire system. There are many different ways a browser can be registered for different purposes (loading a file, loading a URL, loading data based on a MIME type, etc). Each of those registrations are separate.
Default Programs
How to Register an Internet Browser or Email Client With the Windows Start Menu
Registering an Application to a URL Protocol
File Types
Personally, I would probably look at the registration of the "http" and/or "https" URL handler to determine the default browser, since that will be the app that loads when the user types a URL into the Start Menu or Windows Explorer, or an app passes a URL to ShellExecute/Ex().
Read the default value of HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet and optionally check HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\XXX\shell\open\command where XXX is that value picked up from the first key.