Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
redirect IE to Edge can only do one time?

I am trying to redirect IE users to Edge since IE is retiring.

My website is built by Angular 7 and I put this code in ngOnInit()

const ua = window.navigator.userAgent;

if (ua.indexOf("MSIE ") > 0 || ua.indexOf("Trident") > 0) {
    window.location.href = "microsoft-edge:" + window.location.href;

    setTimeout(function () {
        window.location.href = "https://support.microsoft.com/zh-tw/office/%E9%80%99%E5%80%8B%E7%B6%B2%E7%AB%99%E5%9C%A8-internet-explorer-%E4%B8%AD%E7%84%A1%E6%B3%95%E4%BD%BF%E7%94%A8-8f5fc675-cd47-414c-9535-12821ddfc554";
    }, 0);
}

My steps:

  1. Open IE and type http://localhost:4200/index into the URL bar

    → IE window: redirect to Microsoft support page

    → new Edge window open with http://localhost:4200/index

  2. Close Edge window and keep IE window open and retype http://localhost:4200/index into IE

    → IE window: redirect to Microsoft support page

    → no Edge window open

But if I close both IE window and Edge window and open a new IE window and do the whole thing again, it works fine.

Version Info

  • IE version: 1903
  • Edge version: 98.0.1108.62

Does anyone know why and how can I fix it?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!