AMP Html <a target="_blank"> not working on iphone safari browser to go new window
I have investigated the the problem and finally found the proper reason behind the problem.
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.
After serving all the contents as Https including the target="_blank" links, it's working well at my end now.
Md. Ziyed Uddin
Updated on August 19, 2022Comments
-
Md. Ziyed Uddin over 1 year
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>
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.Are there any suggestions to make the new window work on the iOS Safari browser on AMP html anchor click with
target="_blank"
?NOTE: I have configured "In New Tab" on iPhone Safari Settings too.
-
Karl about 5 yearsI am still having this problem even if page and link follow both the same protocol (http or https). I tried the new html 5 download attribute without success. Also tried different Safari settings without luck. Then downloaded Chrome but chrome is also not opening a new tab, Are there more ideas?
-
Ali Ammaar almost 4 yearsthe issue is due to http and this will not occur on https. verified !!
-
Daniel Douglas over 3 yearsI get the same issue regardless of the protocol.
-
Janar about 2 yearsAlso same issue regardless of the protocol