c# - 当我使用来自 UWP 的 Launcher.LaunchUriAsync 转到 MS Edge 时,我可以删除搜索引擎请求吗?
问题描述
当 UWP 使用 Launcher.LaunchUriAsync 导航到 MS Edge 时,会自动添加搜索引擎请求。
我使用 Launcher.LaunchUriAsync 将地址传递给 Windows 默认浏览器。
string uriToLaunch = @"https://proxy.intu-soft.com/?server=google!%*qs=test";
uri = new Uri(uriToLaunch);
await Windows.System.Launcher.LaunchUriAsync(uri);
它移至“ https://www.google.com/search?q=https%3A%2F%2Fproxy.intu-soft.com%2F%3Fserver%3Dgoogle!%25 *qs%3Dtest&ie=&oe=" 而不是“ https://proxy.intu-soft.com/?server=google!% *qs=test” 仅在 Edge 上。
解决方案
我注意到您的 Url 最终指向的地址是
https://patents.google.com/?q=test&oq=test
可以直接使用这个Url启动。
URL跳转变成了搜索引擎搜索,也就是说Edge浏览器无法将你的链接识别为正常的http(s)链接,这可能是由于你的链接中存在异常字符造成的。
虽然这个链接在地址栏输入时可以被识别,但是会经过一个跳转。通过 启动时Launcher
,浏览器将首先确定链接。如果不符合要求,浏览器不会将其视为链接。
这就是不同浏览器的不同处理方式。这不是问题Launcher
。
此致。
推荐阅读
- php - How to get all users with all their roles in a many to many relation based sql query?
- swift - 从一个属性中按字母顺序排列核心数据实体列表 - SwiftUI
- java - Restrict the number of occurrence of . (dot) to 1 in following regular expression
- java - 如何在 Tomcat / Eclipse 中仅部署我的静态内容?
- vue.js - 异步 Vue 生命周期
- javascript - 使用 jQuery 或 javascript,我想知道 html 表的每列(1-4)中有多少个元素 500?我该怎么做?
- sql - Oracle 完全联接中的重复项
- c++ - 如何确保从文件流式传输的数据中正确缩进。看看我的代码,它没有给出想要的结果
- scala - 运行 Scala 脚本时的 Main 对象是什么?
- docker - ASP.Net Core 5.0 Docker - windows/amd64 10.0.17134 没有匹配的清单