Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 34267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:03:05+00:00 2026-05-10T14:03:05+00:00

It looks like we’ll be adding CAPTCHA support to Stack Overflow. This is necessary

  • 0

It looks like we’ll be adding CAPTCHA support to Stack Overflow. This is necessary to prevent bots, spammers, and other malicious scripted activity. We only want human beings to post or edit things here!

We’ll be using a JavaScript (jQuery) CAPTCHA as a first line of defense:

http://docs.jquery.com/Tutorials:Safer_Contact_Forms_Without_CAPTCHAs

The advantage of this approach is that, for most people, the CAPTCHA won’t ever be visible!

However, for people with JavaScript disabled, we still need a fallback and this is where it gets tricky.

I have written a traditional CAPTCHA control for ASP.NET which we can re-use.

CaptchaImage

However, I’d prefer to go with something textual to avoid the overhead of creating all these images on the server with each request.

I’ve seen things like..

  • ASCII text captcha: \/\/(_)\/\/
  • math puzzles: what is 7 minus 3 times 2?
  • trivia questions: what tastes better, a toad or a popsicle?

Maybe I’m just tilting at windmills here, but I’d like to have a less resource intensive, non-image based <noscript> compatible CAPTCHA if possible.

Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:03:05+00:00Added an answer on May 10, 2026 at 2:03 pm

    A method that I have developed and which seems to work perfectly (although I probably don’t get as much comment spam as you), is to have a hidden field and fill it with a bogus value e.g.:

    <input type='hidden' name='antispam' value='lalalala' /> 

    I then have a piece of JavaScript which updates the value every second with the number of seconds the page has been loaded for:

    var antiSpam = function() {         if (document.getElementById('antiSpam')) {                 a = document.getElementById('antiSpam');                 if (isNaN(a.value) == true) {                         a.value = 0;                 } else {                         a.value = parseInt(a.value) + 1;                 }         }         setTimeout('antiSpam()', 1000); }  antiSpam(); 

    Then when the form is submitted, If the antispam value is still ‘lalalala’, then I mark it as spam. If the antispam value is an integer, I check to see if it is above something like 10 (seconds). If it’s below 10, I mark it as spam, if it’s 10 or more, I let it through.

    If AntiSpam = A Integer     If AntiSpam >= 10         Comment = Approved     Else         Comment = Spam Else     Comment = Spam 

    The theory being that:

    • A spam bot will not support JavaScript and will submit what it sees
    • If the bot does support JavaScript it will submit the form instantly
    • The commenter has at least read some of the page before posting

    The downside to this method is that it requires JavaScript, and if you don’t have JavaScript enabled, your comment will be marked as spam, however, I do review comments marked as spam, so this is not a problem.

    Response to comments

    @MrAnalogy: The server side approach sounds quite a good idea and is exactly the same as doing it in JavaScript. Good Call.

    @AviD: I’m aware that this method is prone to direct attacks as I’ve mentioned on my blog. However, it will defend against your average spam bot which blindly submits rubbish to any form it can find.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 136k
  • Answers 136k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The built in conversion tool will not migrate transaction settings… May 12, 2026 at 7:09 am
  • Editorial Team
    Editorial Team added an answer yes, it is. If you are using java.util.Random: An instance… May 12, 2026 at 7:09 am
  • Editorial Team
    Editorial Team added an answer Have you tried using System.nanoTime()? From the Javadoc: Returns the… May 12, 2026 at 7:09 am

Related Questions

It looks like we'll be adding CAPTCHA support to Stack Overflow. This is necessary
Does TFS support an Edit/Merge/Checkin model? It looks like we have to explicitly check
Here's the situation: We have some generic graphics code that we use for one
Can anyone recommend monitoring software for a windows environment? We already have monitoring in
I am writing my first taglib as part of a plugin and I would

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.