大网数据广告活动
网站运营与故障问答

Is email obfuscation with JavaScript still valid in 2021?

· 52CE 我爱测

We built a website with all our team members and their email addresses displayed on our About page. Now the question arose if bots will be able get their email addresses and send spam using those. What is the best way to prevent …

问题原文

原帖链接 · public9nf · CC BY-SA 4.0

We built a website with all our team members and their email addresses displayed on our About page. Now the question arose if bots will be able get their email addresses and send spam using those.

What is the best way to prevent this in 2021? Is protecting email addresses using JavaScript obfuscation still valid in 2021?

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

It is still somewhat effective. I have one page on my website that has my email address on it. That email address is unique to that page and I don't use it elsewhere. That page:

  • Uses JavaScript and HTML entity obfuscation for the email address
  • Doesn't use a mailto: link (you have to copy and paste the email address from text on the page)
  • Is disallowed by robots.txt
  • Isn't linked from my other pages (although it does have at least one external link after 15 years)

I still get zero spam at that address. How much of that can be attributed to the JS obfuscation compared to the other protection measures is impossible for me to know.

I would not recommend putting all your team members email addresses on your website with obfuscation. Even if bots can't read the emails, you don't want anybody to be able to copy all the email addresses by hand and email your entire office.

I'd recommend installing contact form software on your website that allows email to be sent to any of your team. I wrote a free, open-source, contact form that you can use. There are also good contact plugins for most content management system such as Contact Form 7 for WordPress or the Contact module for Drupal.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2021-10-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。