Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello my web application is hosted over internet. My web application is in angular 7. For some purpose i developed a web API in Node JS which is hosted on all the client machines who will use the web application. Both the web application and web API are configured on https. If i run my web application on chrome it easily access my localhost web API. But it gives error when it tries to access on Microsoft Edge.

The error in console is 'Unknown Error'. The problem is that my web application is dependent on Microsoft Edge as it is using some Microsoft components which are only compatible with edge, that's i can't use any other browser.

What I have tried:

I have tried serving my web api through ngrok and my web app accesses it without any error e.g https://(ngrok url) . But if my web app access it through the url of localhost such as https://localhost:3000/getStatus Microsoft Edges gives error in console 'Unknown Error'.
Posted
Comments
Richard Deeming 21-Aug-19 15:52pm    
NB: Edge will soon be replaced with a version based on the same rendering engine as Chrome. You'll need to make sure your site will continue to work in the new version:
Microsoft Edge Insider[^]
The Insider News[^]
Member 14359787 28-Aug-19 6:24am    
But Richard how can i overcome this issue with current version of Edge
Richard Deeming 28-Aug-19 13:40pm    
There's no guarantee that you can. And if you're relying on Edge-only components, there's a good chance they'll stop working once the browser updates.

If it's an AJAX request, you can check to see whether you've set up the correct CORS headers[^] on your localhost API.

You could also try using JSONP[^] for the response.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900