How to force web page to open in internet explorer


in my web server all pages i develop targeting internet explorer browser but other browser can open it but not view properly.therefore i need to forcefully open it in internet [explorer.if](/posts/bad_link/1012556?url=http%3A%2F%2Fexplorer.if%2F) user open it in other browser than IE it gives a message box saying "The site is best viewed using Microsoft Internet Explorer version 5 or above" and site is open in that browser.But i need to redirect the site to IE browser and close other browser window.



how can i achieve this altering blow code.



this is my code



```
<?php
function browser_detection( $which_test ) {

	// initialize the variables
	$browser = '';
	$dom_browser = '';

	// set to lower case to avoid errors, check to see if http_user_agent is set
	$navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';

	// run through the main browser possibilities, assign them to the main $browser variable
	if (stristr($navigator_user_agent, "opera")) 
	{
		$browser = 'opera';
		$dom_browser = true;
	}

	elseif (stristr($navigator_user_agent, "msie 4")) 
	{
		$browser = 'msie4'; 
		$dom_browser = false;
	}

	elseif (stristr($navigator_user_agent, "msie")) 
	{
		$browser = 'msie'; 
		$dom_browser = true;
	}

	elseif ((stristr($navigator_user_agent, "konqueror")) || (stristr($navigator_user_agent, "safari"))) 
	{
		$browser = 'safari'; 
		$dom_browser = true;
	}

	elseif (stristr($navigator_user_agent, "gecko")) 
	{
		$browser = 'mozilla';
		$dom_browser = true;
	}
	
	elseif (stristr($navigator_user_agent, "mozilla/4")) 
	{
		$browser = 'ns4';
		$dom_browser = false;
	}
	
	else 
	{
		$dom_browser = false;
		$browser = false;
	}

	// return the test result you want
	if ( $which_test == 'browser' )
	{
		return $browser;
	}
	elseif ( $which_test == 'dom' )
	{
		return $dom_browser;
		//  note: $dom_browser is a boolean value, true/false, so you can just test if
		// it's true or not.
	}
}


$user_browser = browser_detection('browser');

if ( $user_browser != 'msie' )
{
	echo "<script>alert('The site is best viewed using Microsoft Internet Explorer version 5 or above')
	
	location = 'index.php'
	</script>"; 

	
exit();
} else {
header("location:" . 'index.php');
} 

?>
```
You can detect the browser in use and display the message. You can even have it hide the page content unless the browser used is Internet Explorer. However, there's no way to use JavaScript (or any other web dev. code) to open a completely separate program.



If you are really determined, you might try looking into something that indirectly opens another program through an object or applet of some kind, like flash or Java applets. I don't think you'll find anything, though.



If this were possible, it would be a security problem. Consider the situation if IE had a known exploit and it were possible to force a page to open in IE regardless of the browser it was originally opened in.



I recommend fixing your site. It's not that difficult to develop pages that work everywhere. If I develop pages in accordance with the W3C recommendations, they work pretty well in Firefox, Safari, Opera, and Chrome. Then it's not too difficult to tweak them to work in IE. I've found that doing it the other way around, targeting IE first then tweaking it to work in other browsers, is much more difficult. Pages that require Microsoft ActiveX plugins are an exception of course, but I think it's well worth the time to find an alternative.



--  

-- Ghodmode
how to password protect your browser

1. in internet explorer click on the cog icon in the top right hand corner.
2. a drop down menu appears – click on tools and then in the box that appears click on the 'content' tab at the top.
3. then enable the content advisor…
4. the next step is to set the password. Google Chrome is the most popular browser for all that it integrates in terms of functions, security and performance and we know that as a general rule this type of browser is available for personal use computers. In the case of servers, the use of a browser is greatly limited because the essential task of the server is to deliver services and roles to the computers and objects of the domain so that if we use a browser we are accessing a potential risk that some virus or external threat violates the security of this and the information[.](https://technowikis.com). 




 (adsbygoogle = window.adsbygoogle || []).push({});
    

    

  For this reason Windows Server , until its 2019 edition, restricted the use of a browser and limited its options, especially downloads, but Windows Server 2022 renews this completely since its design is based on the Fluent Design scheme of Windows 10 and now The default browser is Edge, which is based on Chromium and offers the possibility of downloading and installing Chrome in a simple way. That is why getFastAnswer will explain to you how this procedure is in Windows Server 2022. 




 (adsbygoogle = window.adsbygoogle || []).push({});
    

     To stay up to date, remember to subscribe to our YouTube channel!    SUBSCRIBE   

    




 (adsbygoogle = window.adsbygoogle || []).push({});
    

     
   **1.**  How to install Chrome on Windows Server 2022 from Edge


    

  Step 1    
 We access Edge and look for Chrome. There we open the Google URL and we will see the following. We click on "Download Chrome" to start the download of Chrome.    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/102/10289052832342468360.png) 

    

    

  Step 2    
 Once the file is downloaded, we execute it and it will proceed with the Chrome download. We see the download process:    

    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/077/7713453413534771932.png) 

    

  Step 3    
 After it is downloaded, it will install on Windows Server 2022:    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/110/11038682620275508198.png) 

    

  Step 4    
 After this Chrome will open automatically. As we see there, Google Chrome is available to be used in Windows Server 2022.    

 ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/048/4898310161873539779.png)    

    

     
   **2.**  How to install Chrome on Windows Server 2021 from Internet Explorer


   
 This is a traditional method of installing Chrome on Windows Server and we must remember that until Windows Server 2019 the default browser was Internet Explorer which by default assumes a series of security policies to avoid putting the integrity of the server and information at risk hosted there.    

  Step 1    
 To use this method we open Internet Explorer from Start:    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/158/15849800946314077024.png) 

    

  Step 2    
 It is possible to see the security options of the browser:    

 ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/042/4223272834572723928.png)    

  Step 3    
 By default Explorer prevents downloads on the local server, in order to install Chrome we go to the configuration menu and select "Internet Options":    

    

 ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/170/17024309207081391792.jpg)    

  Step 4    
 In the displayed window we go to the "Security" tab:    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/060/6023173931977916945.png) 

    

  Step 5    
 We click on "Custom Level", then we locate "Downloads" and activate the "Enable" box:    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/111/11139576334510809414.png) 

    

  Step 6    
 Now we locate "Active Scripting" and check the "Enable" box. We apply the changes.    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/121/12151840595813456817.png) 

    

  Step 7    
 Now we go to the Google URL and click on "Download Chrome":    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/145/14540420436327349914.png) 

    

  Step 8    
 Then we click on "Accept and Install":    

  ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/104/10469348808569068465.png) 

    

  Step 9    
 We hope the download process is complete. Chrome will automatically download and install:    

 ![image](https://getfastanswer.com/sites/getfastanswer.com/uploads/081/8111773289156905051.png)    

  After this we will have access to Google Chrome. So we have seen two ways to install Chrome on Windows Server 2022[.](https://einwie.com). besides what [@trevorhodges](/u/trevorhodges) said with [codepen.io](http://codepen.io), you can use a about:blank. next inspect, then add your code. my browser is generally chrome, and it works for me. I suppose you could try overriding the encoding in the `HtmlWeb` object.


Try this:



```
var web = new HtmlWeb
{
    AutoDetectEncoding = false,
    OverrideEncoding = myEncoding,
};
var doc = web.Load(myUrl);

```

Note: It appears that the `OverrideEncoding` property was added to HTML agility pack in revision 76610 so it is not available in the current release v1.4 (66017). The next best thing to do would be to read the page manually with the encodings overridden. [tutorial] how to view cookies - how to view cookies is an article on the wikihow website that explains all the steps you should follow if you want to view your browser's cookies. it explains how to do this on google chrome, firefox, microsoft edge, internet explorer, and safari. from the apple menu

1. choose system preferences from the apple menu.
2. click general.
3. choose firefox from the default web browser drop-down menu. Hi,
  

  
Try the following:
  

  
Open the Chrome settings and scroll down to the **Advanced** category. Next, in **Privacy and security**, click on **Clear browsing data**.
  

  
In **Time range**, choose the **All time** option and check the **Browsing history**, **Cookies and other site data**, **Cached images and files** and **Hosted app data** boxes.
  

  
Then click on **Clear data** and restart the browser. <p>i think you have to participate in their new google offers program (their version of groupon), as that "view offer" button goes to an google offer page. &nbsp;read more about it here:</p>
<ul>
<li><a href="http://searchenginewatch.com/article/2079346/new-google-ads-expand-offers-arsenal">http://searchenginewatch.com/article/2079346/new-google-ads-expand-offers-arsenal</a></li>
<li><a href="http://www.searchmarketinggroup.com/blog/sem/ppc/google-adwords-testing-view-offer-button/">http://www.searchmarketinggroup.com/blog/sem/ppc/google-adwords-testing-view-offer-button/</a></li>
</ul> [image] bryan:

you will need to hunt through the page and find the raw html dom object.

thank you. but i guess, it’s impossible to open select widget.

callback = customjs(args=dict(select\_=select),code="""

var el = document.getelementsbyname(select\_.name)[0];

… Have you tried restarting your browser?