javascript - reCAPTCHA 2.0 not appearing in Safari (works in Edge, Chrome, and Firefox) - Stack Overflow

I just integrated the Google reCAPTCHA 2.0 into my site.It works as expected in Chrome, Firefox, and

I just integrated the Google reCAPTCHA 2.0 into my site. It works as expected in Chrome, Firefox, and Edge, but it doesn't work / appear in Safari on my MacBook Pro.

  • MacBook Pro: macOS Sierra version 10.12.2.
  • Safari: Version 10.0.2 (12602.3.12.0.1)

The reCAPTCHA is being used within a dhtmlXForm like this...

...
{ type:"label", name:"myrecaptcha", label:"<div class=\"g-recaptcha\" data-sitekey=\"MY_KEY_HERE\"></div>", offsetLeft:320 },
...

Which in all browsers except for Safari generates this...

But in Safari it doesn't appear...

There are no errors in the console. I have cleared all browser cache. The location of the api.js line is immediately before the closing </head> tag like Google's documentation says. Not sure what else to try.

UPDATE: In Safari when I inspect the area where the reCAPTCHA is supposed to show I only see the original <div class="g-recaptcha" data-sitekey="MY_KEY_HERE"></div> with nothing in it. So it's not putting the iframe into that div for some reason. Hope that helps.

UPDATE: I went back and implemented reCAPTCHA v2 today (3.5 years later) and it appears to work in Safari now.

I just integrated the Google reCAPTCHA 2.0 into my site. It works as expected in Chrome, Firefox, and Edge, but it doesn't work / appear in Safari on my MacBook Pro.

  • MacBook Pro: macOS Sierra version 10.12.2.
  • Safari: Version 10.0.2 (12602.3.12.0.1)

The reCAPTCHA is being used within a dhtmlXForm like this...

...
{ type:"label", name:"myrecaptcha", label:"<div class=\"g-recaptcha\" data-sitekey=\"MY_KEY_HERE\"></div>", offsetLeft:320 },
...

Which in all browsers except for Safari generates this...

But in Safari it doesn't appear...

There are no errors in the console. I have cleared all browser cache. The location of the api.js line is immediately before the closing </head> tag like Google's documentation says. Not sure what else to try.

UPDATE: In Safari when I inspect the area where the reCAPTCHA is supposed to show I only see the original <div class="g-recaptcha" data-sitekey="MY_KEY_HERE"></div> with nothing in it. So it's not putting the iframe into that div for some reason. Hope that helps.

UPDATE: I went back and implemented reCAPTCHA v2 today (3.5 years later) and it appears to work in Safari now.

Share Improve this question edited Jun 26, 2020 at 17:13 gfrobenius asked Jan 11, 2017 at 19:58 gfrobeniusgfrobenius 4,06710 gold badges38 silver badges66 bronze badges 4
  • If you have adblock, Try turning it off ... – Ani Commented Jan 24, 2017 at 16:34
  • Safari - Preferences -> Security -> I unchecked "Block pop-up windows". I had no effect. I have no other ad blocking software in place. – gfrobenius Commented Jan 24, 2017 at 19:15
  • UPDATE: In Safari, if I go to Develop -> User Agent -> If I select Edge, Chrome (Win or Mac), Firefox (Win or Mac) it works. This is in Safari, just changing the user agent. Maybe that will help someone narrow this issue down, I don't know. – gfrobenius Commented Jan 24, 2017 at 19:23
  • It is not exclusive to your site - i have found other sites where captchas work in Chrome but not in Safari (which is how I ended up here) – Jeremy Young Commented Sep 13, 2017 at 9:50
Add a ment  | 

3 Answers 3

Reset to default 0

1. $('#captcha-form script').remove();

'captcha-form' is the id of the form containing the captcha. Remove the script tags so the scripts don't get executed a second time when Safari re-renders them after jQuery moves them. The event handlers created by the script aren't in the script tags, so they survive.

2. Set the links in The reCAPTCHA config file from http to https

I just recalled that I had also turned on "Use HTML5 in forms" in the Formidable General settings recently. If I uncheck that, the reCAPTCHA works on Safari.

So, this would indicate that there is a problem with your implementation of HTML5 in forms, maybe that only surfaces when the site uses HTTPS.

3. Refer to these links provided below for more details -

reCAPTCHA2.0 troubleshooting

reCAPTCHA Frequently asked questions

Google reCAPTCHA tutorial

I'm facing the same issue on my site, in my case it's in Firefox, apparently it's because JavaScript is disabled (even though it's enabled in the browser ! and I tested on 3 different puters) I know this because because when I changed the settings for the reCaptcha to support browsers that don't support Javascript, it solved the problem for me.

To do this you can "navigate to the admin console and move the security preference slider to "easiest for users". Keep in mind that with this setting reCAPTCHA won't be able to use all of its security features." as said in reCAPTCHA Frequently asked questions

I hope this will help someone narrow the issue down.

PS : I don't have enough reputation to leave a ment.

old question, but maybe it helps someone anyway.

i had same problem with Google Recaptcha: works fine in Chrome & Firefox, but did not work in Safari & Epiphany.

i solved it by replacing some old javascript-code:

if( typeof Map !== "function" ) {
  function Map() {
    // own definition similar to https://stackoverflow./a/15739569/7135635
  }
}

now i use function MyMap() { ... } and captcha works fine.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1741506652a4350560.html

相关推荐

  • Windows下的python安装教程_2024年10月最新最详细的安装指南

    文章目录 前言一、下载python二、安装python三、验证环境四、配置环境变量&#xff08;可选&#xff09;总结 前言 Python 是一种广泛使用的高级编程语言&#xff0c;以其简洁易读的语法和强大的

    1小时前
    00
  • MCP实战

    前言最近热衷于找一些好玩的MCP,集成在cursor中,给大模型外挂许多有趣的功能,例如:什么是MCP?本地如何开发MCP ServerMCP实战 | cursor 如何一句话操作 gitHub 代码库cursor 如何调用 MCP ser

    1小时前
    00
  • win 7系统怎么看计算机配置,windows7系统怎么查看电脑配置

    通常我们在选购电脑的时候都比较注重电脑配置&#xff0c;那么windows7系统怎么查看电脑配置呢?接下来大家跟着学习啦小编一起来了解一下windows7查看电脑配置的解决方法吧。 windows7查看电脑配置方法一&#x

    1小时前
    00
  • 很干!dockerfile最佳实践

    为什么你打包的镜像那么大?为什么打包过程耗时这么久?导致整个部署的效率很低,如果你有这样的疑问,那么很多时候是因为dockerfile的问题,这篇文章将会深入介绍dockerfile的最佳实践,帮助你构建更高效、更小、更可维护的镜像。缓存机

    1小时前
    00
  • PDF转换Word深度评测

    ComPDFKit PDF 转换 SDK V3.0有以下几个新功能:使用百万级文档训练数据集对 PPYoloE AI 模型进行微调全场景布局分析算法及下一代表格识别算法重构数据结构、转换流程、PDF解析和输出模块混合布局:将流式布局与固定布

    1小时前
    00
  • 《Google Gemini 1.5 Pro:MoE架构如何重塑AI性能与效率》

    Google Gemini 1.5 Pro的诞生犹如一颗璀璨新星,吸引了无数目光。尤其是其采用的混合专家系统(MoE)架构扩展,为模型性能与推理效率带来了革命性的提升,在AI领域掀起了一阵讨论热潮。传统的人工智能模型就像是一个全能型选手,无

    57分钟前
    00
  • Power BI Vega 条形纵向折线组合图表

    条形图和纵向折线图组合常用来展示绝对值和率值的组合。之前在知识星球分享过SVG的版本(使用内置表格加载),今天换一种实现方式,使用Deneb视觉对象:把需要展示的维度和指标拖拽到Deneb,本例维度为城市,绝对值为[kpi]度量值,率值为[

    53分钟前
    00
  • 解决Windows 7安装MySQL难题:API-MS-WIN-CORE-PATH-L1-1-0.DLL 下载指南

    解决Windows 7安装MySQL难题&#xff1a;API-MS-WIN-CORE-PATH-L1-1-0.DLL 下载指南 api-ms-win-core-path-l1-1-0.zip项目地址:https:gitcode

    53分钟前
    00
  • DeepSeek辅助Power BI自定义Vega条形图

    Power BI Deneb这个视觉对象支持Vega自定义图表。网上有丰富的Vega代码资源,参考《Power BI Deneb图表资源库》,EasyShu提供了Excel版本的Vega图表库,Power BI也可以借鉴。使用Vega并不意

    52分钟前
    00
  • 完美解决win7系统使用wireshark未响应问题

    Win7系统&#xff0c;安装wireshark4.0的版本&#xff0c;发现打开可以打开&#xff0c;但是只要点击网卡之后就会显示无响应 一开始我以为是位数的原因&#xff0c;之前用的64位的&am

    51分钟前
    00
  • 基于PacBio HiFi数据的人类全基因组重测序变异分析流程

    随着第三代测序技术,特别是PacBio HiFi(High Fidelity)测序技术的发展,我们能够获得兼具长读长和高准确度的测序数据。这为人类全基因组重测序(WGS)分析,尤其是复杂区域和结构性变异(Structural Variati

    46分钟前
    00
  • 扣子空间能战否?我看行~

    最近扣子推出了新模块:扣子空间,功能和前段时间刷屏的Manus类似,就是帮你一步到位完成任务。扣子空间地址:扣子空间现在还没完全开放,需要有邀请码,没邀请码的同学先加入等候名单,然后静静等待~这个扣子空间和普通的AI聊天工具有什么不一样呢?

    43分钟前
    00
  • lenovo联想拯救者Legion Y9000P 2022款2023款2024款笔记本电脑(82RF,82WK,82WQ,83DE,83DF)原装出厂Windows11预装OEM系统镜像下载

    拯救者Legion Y9000P IAH7H 2022款【82RF】原厂Win11系统包 链接&#xff1a;https:pan.baidus1HYN4eO6eWCkgdP6ZxsjnmA?pwdnqw8  提取码&am

    37分钟前
    00
  • CMeas度量体系建设:让数据驱动更科学

    本文来自腾讯蓝鲸智云社区用户: CanWay研发效能度量在企业数字化转型中至关重要。它有助于企业全面量化研发过程,洞察业务绩效,识别效能瓶颈或提效机会、优化资源配置,并为决策提供有力支撑,持续推动企业研发效能优化提升。目前,效能度量已不局限

    35分钟前
    00
  • Sentinel 的熔断和限流

    在分布式系统里,服务之间牵一发而动全身,一个接口雪崩,可能带崩整个应用链路。要想系统抗住流量洪峰,顶住突发异常,就得在稳定性上下功夫。今天我就来说说稳定性保障里的老将——Sentinel,看看它是怎么凭借限流熔断,在服务治理的江湖里占得一席

    31分钟前
    00
  • AI 英语能力评估App的开发

    开发一款 AI 英语能力评估 App 是一个系统工程,它结合了移动应用开发、后端服务构建、人工智能模型研发和教育评估理论。整个过程比开发一个普通 App 要复杂得多,需要多领域的技术和专业知识。以下是开发这样一个 App 的关键环节。1.

    21分钟前
    20
  • goframe这个劲爆的脚手架做项目还是非常不错

    goframe一个由国人封装的go语言框架,模块化的设计理念非常不错。要学习goframe框架内的相关技术,找一个成熟的系统进行研读是入门提高的不错选择。今天分享一个基于goframe框架的开发的后台管理系统。功能非常不错,而且前后端代码都

    18分钟前
    00
  • MODIS遥感影像批量下载方法

      本文介绍在Earthdata中批量下载MODIS遥感影像各产品数据的方法。  前期我们介绍了批量下载Landsat与MODIS等遥感影像的最新可行方法,本文则再介绍一种基于Earthdata的MODIS批量下载方法。但要注意,此方法有的

    15分钟前
    20
  • OFC 2025 Google报告:AI时代的光通信挑战

    在OFC会议的数据中心峰会上,谷歌带来了一场深度分享,直指AI和ML时代光通信技术面临的关键问题。报告中,谷歌明确指出可靠性与可用性、功耗、带宽规模三大“潜在砖墙”,并结合实际案例与数据,剖析挑战本质及解决思路 。一、AI时代的

    11分钟前
    00
  • CICD界一颗冉冉升起的新星,主打一个各种可以

    介绍在云计算与容器化技术高速发展的当下,多服务器环境下的软件构建与部署效率已成为开发者亟待突破的瓶颈。Komodo作为开源工具领域的革新者,凭借其高度灵活性、无限扩展潜力及人性化设计,为DevOps团队与独立开发者提供了全链路的解决方案。这

    6分钟前
    00

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信