[Fixed] How to redirect from Internet Explorer to Microsoft Edge seamlessly?


I’m trying to deprecate Internet Explorer on my website, and I would like to replicate Twitter’s behavior when someone tries to visit the site on Internet Explorer.

From what I’ve pieced together of their process so far it seems like there is a server side check based on the User Agent string that detects the browser type, then sends something to redirect to https://go.microsoft.com/fwlink/?linkid=2135547 but simultaneously opens up Microsoft Edge and directs that to https://twitter.com

The confusing part for me is how they manage to open Microsoft Edge without opening a dialog box that asks whether you would like to open the link with the application. I’ve seen websites use microsoft-edge:url to open an url in Microsoft Edge but that always asks you whether you’d like to open that application or not.

If anyone has information on how they manage it or how to replicate it, it’d be appreciated.

In case it helps, my website is built on express.js, and the redirecting I’m trying is based on res.redirect in some express middleware.


This appears to be a special interface between Internet Explorer and Edge that uses an Internet Explorer Browser Helper Object named “IEtoEdge BHO” along with a list of incompatible websites that is maintained by Microsoft.

This requires Microsoft Edge Stable version 87 or later.


The following code closely resembles the behavior, with the exception of the dialog in Edge to migrate the browsing data and preferences. I don’t receive any prompt, so perhaps that has changed.

  if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
    window.location = 'microsoft-edge:' + window.location;
    setTimeout(function() {
      window.location = 'https://go.microsoft.com/fwlink/?linkid=2135547';
    }, 1);

Leave a Reply

(*) Required, Your email will not be published