





On my various websites I get hundreds of Spam messages every day; it gets very annoying! I've tried several methods and in this post I will outline three. Soemtimes they works, sometimes they don't. Some are more effective than others.
1. Captchas. Captchas are a random strings of text and numbers that a user must enter to be classed as non-spam. The letters and numbers are displayed as an image and usually over a pattern and are distorted to prevent bots from easily reading them.
Pros: Skewed text against noisy background can be hard for Spam bots to read
Cons: Can be difficult for humans to read, spam bots are getting better at recognising them
2. Hidden text fields. Create a text field in your form and hide it via your CSS (using display: none). When processing the form if the field has been filled out it is Spam.
Pros: Filters out around 75% of spam bots
Cons: Some bots check your CSS, those with CSS disabled still see the text field
3. Ask a question. Ask a question that doesn't have the answer in the question. A popular one could be a maths question (e.g. what is 1 + 5). Even more effective would be What colour is the sky?
Pros: Filters out 99% of spam
Cons: Some foriegn users or those who struggle with spelling may get the answer wrong