简体   繁体   English

即使我已经在 Microsoft Edge 中,也将 URL 重定向到 Microsoft Edge

[英]Redirect URLs to Microsoft Edge even if I'm already in Microsoft Edge

My objective is to force an URL to be opened in Microsoft Edge.我的目标是强制在 Microsoft Edge 中打开 URL。 I found a way to do this with : microsoft-edge:url .我找到了一种方法来做到这一点: microsoft-edge:url

The fact is that this method works under Internet Explorer, Chrome but NOT in Edge.事实上,这种方法在 Internet Explorer、Chrome 下有效,但在 Edge 中无效。 Using this method in Edge will open a Bing search but not my link.在 Edge 中使用此方法将打开 Bing 搜索,但不会打开我的链接。

I'm encountering this issue because I want to change a link from a website and it doesn't work at all if I'm already in Edge.我遇到了这个问题,因为我想从网站更改链接,如果我已经在 Edge 中,它根本不起作用。

Is there any solution?有什么解决办法吗?

The microsoft-edge:url protocol enables other browsers to switch to Edge, except Edge itself since you're already in Edge. microsoft-edge:url协议允许其他浏览器切换到 Edge,除了 Edge 本身,因为您已经在 Edge 中。 In this case, I would suggest modifying your code.在这种情况下,我建议修改您的代码。 You can first detect if the user is using Edge or other browsers.您可以先检测用户是否使用 Edge 或其他浏览器。 For other browsers, you can use microsoft-edge:url protocol;对于其他浏览器,可以使用microsoft-edge:url协议; For Edge, you can simply use the url.对于 Edge,您可以简单地使用 url。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM