打开我的 JQTouch Iphone WebApp 的主页图标,为什么每个外部链接都在另一个 safari 窗口中打开?

发布于 2024-09-15 02:20:04 字数 213 浏览 4 评论 0原文

使用 JQTouch 库,使用类似以下 ... 的链接应在 SAME 窗口中打开新页面。当我使用 Safari 访问该网站时,效果很好但是,当我从主页保存的图标启动该网站时,它会打开一个全屏网站,并在第一个链接上打开一个 > Safari 窗口。我怎样才能让它保持在原来的全屏窗口中?

Using the JQTouch library, usely links like the following ... should open the new page in the SAME window. That works fine when I go to the site using Safari BUT when I launch the site from the home saved icon, it opens a fullscreen site and on the first link it opens a NEW Safari window. How can I make it stay in the same original fullscreen window?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

嗫嚅 2024-09-22 02:20:04

您必须将目标设置为 _webapp。例如:

<li class="arrow"><a href="some_page.html" target="_webapp">Some Page</a></li>

然后它将加载在同一页面上。

You have to set the target to _webapp. E.g:

<li class="arrow"><a href="some_page.html" target="_webapp">Some Page</a></li>

and then it will load on the same page.

穿越时光隧道 2024-09-22 02:20:04

您需要查看清单文件。

清单文件声明 iPhone 应缓存哪些文件(html、javascript、css、jpg 等)以使 Web 应用程序离线工作。清单文件的一部分用于声明在全屏(Web 应用程序)模式下可以使用哪些 URL。

具体查看清单文件中的 NETWORK 。

示例:

NETWORK:
*

这应该允许访问您喜欢的任何 URL,并保持 Web 应用程序模式。

或者使用 target="_self" - 我在任何地方都没有看到 target="_webapp" 。

/摩根斯

You need to look into manifest files.

The manifest file declares what files (html, javascript, css, jpgs etc.) that the iPhone should cache in order to make a webapp work offline. A part of the manifest file is used to declare which URLs are OK to use when in full screen (webapp) mode.

Specifically look at NETWORK in manifest files.

Example:

NETWORK:
*

This should allow access to any URL you like, and stay in webapp mode.

Alternatively use target="_self" - I haven't seen target="_webapp" anywhere.

/Mogens

冷︶言冷语的世界 2024-09-22 02:20:04

我在这里找到的一个解决方案是更改您为移动应用程序编写链接的方式。而不是 a href='link.url',您应该编写 a href="javascript.window.location.href='link.url'"

免责声明:我还没有亲自尝试过,所以我不能保证它会起作用。但从逻辑上来说,确实有道理。

One solution I found here is to change the way you write your links for a mobile app. Rather than a href='link.url' you'd write a href="javascript.window.location.href='link.url'"

Dislaimer: I haven't personally tried this yet, so I can't guarantee it will work. But logically, it does make sense.

仅当删除 rel="external" 时,使用 target="_webapp" 才有效,不能同时拥有两者。

Using target="_webapp" works only if you remove the rel="external", you cannot have both.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文