AMP HTML< target ="_ blank">在iPhone Safari浏览器上无法使用以进入新窗口 [英] AMP Html <a target="_blank"> not working on iphone safari browser to go new window

查看:715
本文介绍了AMP HTML< target ="_ blank">在iPhone Safari浏览器上无法使用以进入新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我正在使用Accelerated Mobile Pages(AMP)开发一个渐进式Web应用程序.我必须添加带有target="_blank"的锚链接,以便用户单击该链接将被重定向到具有锚位置的新窗口.

Recently I am developing a progressive web app with Accelerated Mobile Pages (AMP). I have to add anchor link with target="_blank" so that a user click on that link will be redirected to a new window with anchor location.

<a href="External_Url" rel="external" target="_blank">Click</a>

它在Android浏览器上运行正常,但target="_blank"在iOS Safari浏览器上完全无法运行.我知道可以使用Javascript解决此问题,但是在AMP,由于约定,我们不能使用任何Javascript.

It's working fine on Android browser but target="_blank" is totally not working on the iOS Safari browser. I know this can be solved with Javascript but here at AMP we can not use any Javascript due to convention.

是否有任何建议使新窗口在AMP html锚点上的iOS Safari浏览器上运行,并单击target="_blank"?

Are there any suggestions to make the new window work on the iOS Safari browser on AMP html anchor click with target="_blank"?

注意:我也已经在iPhone Safari设置中配置了在新标签页中".

NOTE: I have configured "In New Tab" on iPhone Safari Settings too.

推荐答案

我研究了问题所在,并最终找到了问题背后的正当理由.

I have investigated the the problem and finally found the proper reason behind the problem.

这基本上是由于文档内容混合而发生的.该站点通过Https提供服务,其中链接为Http.这是Safari浏览器阻止target ="_ blank"不进入新窗口的主要原因.由于安全问题,最新的野生动物园浏览器阻止了此类混合内容链接.

This is basically happening due to mixed content on document. The site is serving through Https where the links are Http. This is the main cause of safari browser preventing target="_blank" not to go new window. The latest safari browser blocking these type of mixed content links due to security issue.

在将所有内容(包括target ="_ blank"链接)作为Https提供之后,到现在为止,它运行良好.

After serving all the contents as Https including the target="_blank" links, it's working well at my end now.

这篇关于AMP HTML&lt; target ="_ blank"&gt;在iPhone Safari浏览器上无法使用以进入新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆