I was wondering if there were any other good alternatives. Programmers may deliberately obfuscate code to conceal its purpose (security. Obfuscating an email using JavaScript Ask Question Asked 2 years, 11 months ago Modified 2 years, 11 months ago Viewed 1k times 3 I understand that this question has been asked many a times and the general consensus is that spam-bots will always figure out a way to harvest emails eventually so it is a lost cause. In software development, obfuscated code is the deliberate act of making source or machine code difficult to understand by humans. Searching Google didn't reveal any solutions that I consider better than my current solution. A simple JS Obfuscator using packer library. Because of this, I'm not expecting a foolproof obfuscation, however I was curious to see what other suggestions were out there. I was wondering if there was any better (less intrusive (or at best, not very intrusive) but more spammer resistant) way of obfuscating emails on a web page.Īs with any type of obfuscation, if a human or computer can easily de-obfuscate it, then a spammer could easily do the same. For people without JavaScript enabled, every mail client I know would consider the email address as invalid, however the user should be able to infer what is needed to correct the symbol. Email Obfuscator Im not the author of this package. For people using browsers with JavaScript enabled, they see everything working normally. I then use some JavaScript to decipher all mailto links which have this (a) sign in the email and convert them to on page load. I also encode the email, replacing the sign with (a), so that the email reads something like: stackoverflow(a) Right now I've got a JavaScript based obfuscator that uses a combination of HTML encoding & JavaScript to convert an obfuscated email into a normal email transparently.įormat the "mailto:" part of the href in links to be HTML encoded like: mailto: The best part of that technique is that it does not slow down your page and makes the bots crazy to target other resources. There are several techniques to output the text, but the simple and easiest way is to use the document.write () method. I'm trying to come up with a JavaScript email obfuscator to reduce the chance for spam in emails listed on a web site. Using JavaScript: One of the best ways to obfuscate your email address is to use Javascript techniques.
0 Comments
Leave a Reply. |