移动浏览器:如何在原始选项卡中打开重定向链接?
我要做的是在移动 - 萨法里 / iOS中要做的是:
- 在我的Web应用中,将深链链路打开到安装在用户手机上的应用程序中,
- 用户在此应用中签署了一条消息,应用程序将
- 应用程序重定向到我的redirect_url ,回到我的Web应用程序,
- 我的Web应用程序解析了该应用程序添加到redirect_url的查询 - 帕拉姆斯
这是我的Web应用程序如何在用户的移动浏览器上与本机移动应用通信的基本流程。我想知道;有没有办法设置redirect_url使重定向回到打开的原始标签?这将是一个翻页,这意味着任何内存数据都会丢失,但是我可以生存下来。每次循环时,iOS都会打开我的Web应用程序的多个选项卡,这很奇怪,而且我什至无法保证iOS会打开同一Web-Browser(如果Safari如果Safari,它可能会从Chrome到Safari。例如,默认值)。
理想情况下,我想每次使用相同的Web浏览器,相同的选项卡。我正在使用window.location.replace(ConnectUrl)进行重定向。
该通信流有任何解决方案 /建议吗?谢谢。
What I'm trying to do, in mobile-safari / iOS is:
- in my web-app, open a deep-link into an app installed on the user's phone
- the user signs a message in this app
- the app redirects back to my redirect_url, coming back to my web-app
- my web-app parses the query-params added to the redirect_url by the app
This is a basic flow of how my web-app can communicate with a native mobile-app on a user's mobile-browser. I'm wondering though; is there a way to set the redirect_url such that the redirect comes BACK to the original tab that was open? It will be a page-refresh, meaning any in-memory data will be lost, but I can survive that. It's just weird that iOS will open up multiple tabs of my web-app every time we do a loop, and also I can't even guarantee that iOS will open up the same web-browser (it might go from Chrome to Safari if Safari is default, for example).
Ideally, I'd like to use the same web-browser, same tab every time. I'm using window.location.replace(connectURL) to do the redirect by the way.
Any solutions / suggestions for this communication flow? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论