How to Automatically redirect website IE browser to Chrome browser? - google-chrome

Recently we migrated to latest version of application which allows the user to open application in any browser.
Earlier it use to support Only IE browsers.
After migration many users still open the application in old browser.
Since the application is very slow in IE browser.We are looking for a solution that will automatically open the URL/Login Page in Chrome browser when user opens in IE browser.
i.e., when a user open URL in IE browser it automatically open the same URL in Google chrome browser.

Google Chrome Legacy Browser support allows this. Under the "Hosts to open in Alternative Browser" policy, put in an entry for the site you want to force to open in Chrome, preceding it with an "!". Example:
!https://www.somesitetoopeninChromeonly.com.

If i understand it correctly, the users open a page in IE and when they click an url on that page, it will open that URL in Chrome.
I guess, you can't do this. You can use target="_blank" to open a new tab in the same browser.
If you want to open a link from an application in chrome and not in IE, you can change the default browser to chrome. Click on Start, type the "default app settings" and change the default browser to chrome.

I think the best solution is to let the user open Google Chrome manually by informing about it.
It is possible however, to make a document called "chrome.hta" for example, with the contents shown below, and then link to it on another page. (This will only work in Internet Explorer, not Edge)
<script type="text/javascript" language="javascript">
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
var website = "http://example.com/";
oShell.ShellExecute(commandtoRun, website, "", "open", "1");
window.close();
</script>
The user now has to press "open" and "allow" after they click the link referring to the .hta file.
Now, on the page where you link to the .hta document, you can make the page detect the browser and adjust the link accordingly:
<a id="link" href="example.com">My Application</a>
<script>
if (navigator.appName == 'Microsoft Internet Explorer' || !!(navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv:11/)) || (typeof $.browser !== "undefined" && $.browser.msie == 1))
document.getElementById("link").href = "example.com/chrome.hta";
</script>

A bit late, but we have two different solutions for this:
We use a javascript: link to use ShellExecute to run a small exe helper application that checks if Chrome is installed, and if it is, open Chrome to the URL parameter, optionally with switches (e.g. --use-system-default-printer and on shared logon PCs, --incognito). This requires configuring special permissions for the site in Internet Options|Security.
Now we can also use the microsoft-edge: protocol to open sites in Edge.
You could also install your own protocol for opening sites in Chrome but you would need a helper application to re-write the URL. I have one written to add microsoft-edge-private: to open links in Edge in InPrivate mode.

To open the webpage in Microsoft Edge you can try the below code.
TEST

Related

How to change browser from IE to Chrome on Hyperlink click [duplicate]

This question already has answers here:
Can I force a link to open in a specific browser?
(6 answers)
How can I open a link in the default web browser from an HTA?
(2 answers)
Closed 2 years ago.
I have one application which default open in IE browser. On the home page, there is link. if we click that link, application open in another tab of IE but I want to change the browser also.
<!DOCTYPE html>
<html>
<body>
<p>Open link in a chrome browser Visit Dotnet Tutorial</p>
</body>
</html>
If I click on Visit Dotnet Tutorial, it should open in chrome. How to setup browser also in Hyperlink.
Please help on this.
thanks
Place this code in between head tag.
<script type="text/javascript">
function openURL()
{
var shell = new ActiveXObject("WScript.Shell");
shell.run("Chrome https://google.com");
}
</script>
and use anchor tag like this.
<a href="#" title="your wish" onclick="openURL()">
Based on an answer to How can I open a link in the default web browser from an HTA? by Johnny Buchanon - Oct 9 2008.
This is not possible from the HTML.
Browser is chosen based on the Operating System settings.
Yours is obviously IE.
If you own the dotnet-tutorial page, you can set up a browser check there
and add a notification like:
"This page works best in Google Chrome"
This question explains how to detect browser:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
Extension to Ajay's answers if ActiveX - Automation Server Can't Create Object and link doesnot open in chrome
please follow this steps:
a) Go to Tools-->Internet Options
b) Select security tab
c) Click on Trusted Sites (or Local Intranet depending on whether your site is trusted or not)
d) Click on Custom Level
e) Ensure that "Initialize and script active x controls is not marked safe for scripting" is enabled - this comes under Activex controls and plug-ins section towards 1/4th of the scroll bar.
Click OK, OK.
Once this is completed, clear the browser cookies and cache. Close all your browser sessions. Reopen the IE to launch your site.

PDF-files on server will not open when link is clicked in browser

I've got a pdf on the network server that I'd like to view it in my browser. I do NOT want to download the pdf to view it.
I have the following link:
Click me!
It works and opens perfectly in Chrome, yay! (although it seems like it's only working when I'm logged on using my google-account)
When I click the link in Firefox, nothing happens, less yay...
If I, in Firefox, right-click the link, choose "Copy Link Location" and paste the link into the address field, it opens the pdf just fine.
I've tried using zero and up to 6 of those pesky / after file: just for making sure... I was desperate...
The plug-in for Acrobat Reader is up to date.
The reason for this not working is because of the security feature not allowing cross-usage of the protocols http:// and file://.
To solve this in Chrome, download a plugin called LocalLinks (link).
For Firefox, there is currently no solution afaik.
For Safari (versions 6+), you could possibly activate the Develop-menu for safari (open preferences, choose advanced and then check the box for "Show develop menu in menu bar") and then enable the option "Disable Local File Restriction". However, this is an untested solution.

Link of a PDF not working in Mozilla but works in Chrome

I made a button for a PDF download that is working well in Chrome but it doesn´t open in Mozilla.
This is the code I used:
<a target="_blank" href="http://gerster.com/docs/posamenten_neuheiten_2014_2.pdf">Jetzt PDF-Katalog herunterladen</a>
What could be wrong?
Note: No error is showing up.
Q Using window.open or "target=" such as blank it doesn´t open in ### Browser
What could be wrong?
It is up to each user to download or permit binary.PDF running in a browser viewport after download, this is especially true after download fron any non trusted site.
OOB many browsers assume they can sandbox the PDF download and then allow as default action review of the PDF file. Chromeium based browsers like Edge may be more inclined to use that before the user improves their security.
So the 1st task for a user should be to switch off Edge auto viewing of PDFs and switch to a more secure setting.
In that case Edge / Chrome and other browsers will NOT auto run the downloaded PDF but ask the user if they wish to View after Download or simply Download.
One of the possible values of that attribute is _blank, which tells the browser to open a new window (or tab, if that’s the user’s preference) when that link is clicked.
This used to be “invalid” in HTML
see A Bad Reason: The link is to a PDF
If you are going to do it, not only do you need the target attribute for the functionality, you need to rel attribute for security.
So do not open yourserver to security issues blacklist or pop-up blocking see https://mathiasbynens.github.io/rel-noopener/
Don’t use target=_blank (or any other target that opens a new navigation context), especially for links in user-generated content, unless you have a good reason

How can I get local web pages to always open in a new window in XP?

I am running windows XP 2003 sp3. Ie is the default browser. If I have a web page open and then open a local web page it will always open it in the existing window. I want local web pages and url shortcuts to always open in a new window. How can I do this?
Somehow I don't think you are asking for programming help but I'm going to respond appropriate to the forum. Use the target attribute on your links to force browser window/tab actions. Valid standard options are: _self, _blank, _top, _parent. Use _blank to force the link to open in a new tab/window as per the default behaviour you have setup in IE.
Example
I don't think this can be done. The thing is windows XP will tend to open any local web page files and its shortcuts with the "Default Programs" that's mapped to that file type. So in your case, the IE being the default browser program, it opens in a new tab.
The same file will open up starting IE if there isn't any instance of IE already running. So I think the simple way to do your need is to have another IE instance running, and drag-drop the file you wan't to open into the IE window, which will open it.
P.S: other browsers like chrome allows dragging the tab outside the window to open up in a different window.

Launch file:// from Firefox or Chrome

I am looking for a way to launch a file located on our local file network for use via our local intranet using Firefox or Chrome.
The link works well in IE:
View Report
but in Firefox it shows:
View Report
is there a way to get the link to render properly?...Just a simple click from a href tag.
For Chrome, a new extension was just posted today! It's called LocalLinks and it replicates the functionality of the locallink add-on for Firefox! You'll find it on the Google Extensions page, or you can get to it directly here:
https://chrome.google.com/extensions/detail/jllpkdkcdjndhggodimiphkghogcpida
Enjoy!
This is not enabled in firefox for security reasons (remember that most computers have files and applications of a sensitive nature located in similar locations, like C:\System\Windows)
you can try adding this to the user.js file for any user that needs to be able to access these links:
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "file:///[[PUT SERVER NAME HERE]]";);
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
Just remember that this is a security risk.
Firefox seems to want file://///Start/Of/My/Network/file.xlsx
Chrome and IE handles that too.
file://Start/Of/My/Network/file.xlsx appears to work in Chrome as well, sometimes firefox hics up on it..
There is the LocalLink add-on for firefox. It uses a context menu though...
Use IE tab (available for Chrome and Firefox) and set that to handle all links of the form file:/// by adding an autourls entry like this:
r/file:///.*
Technically this isn't opening the file in the original browser, but it gives you all the windows explorer integration you'd expect from whatever IE version you've got installed when dealing with local file links. I would advise against doing this except in cases when the browser isn't being used to access the web - e.g. for viewing internal wiki or intranet pages, due to the obvious security risk.