Hide your emails from spammer's scanners and show them to your visitors naturally.
We want to put [email protected] on the page. Normally we write this code:
<a href="mailto:[email protected]">[email protected]</a>
And this is like serving a honey on the tray to the bear. So we try to confuse scanners by presenting email in forms that only human can understand. Like:
- [email protected]
- demo (a) mail.com
- demo at mail dot com
- etc.
Let's make this in an other way. Put crypted email address in the source code and let JS decrypt it.
The code looks like this:
<email val="ZCczbSc5QCczbWEnOGwuYyc5bQ==">some alternative text like demo at email dot com</email>
and JS will change it to this:
<email val="ZCczbSc5QCczbWEnOGwuYyc5bQ=="><a href="mailto:[email protected]">[email protected]</a></email>
Two files ajaxEmaCrypt.php
and jquery.emacrypt.js
.
First, encrypt an email address:
[email protected]
or use tool in demo.html file.
You will get an address encrypted to this ZCczbSc5QCczbWEnOGwuYyc5bQ==.
Put it in <email>
tag:
<email val="ZCczbSc5QCczbWEnOGwuYyc5bQ=="></email>
Or with an alternative text:
<email val="ZCczbSc5QCczbWEnOGwuYyc5bQ==">demo at mail dot com</email>
Put jquery.emacrypt.js
after jquery library. It will in one second after page load scan all tags and convert them to clickable and readable email address.
Check out the demo.html file.