Support » Plugins and Hacks » [Resolved] [Plugin: SI CAPTCHA Anti-Spam] SI CAPTCHA – Javascript required?

[Resolved] [Plugin: SI CAPTCHA Anti-Spam] SI CAPTCHA – Javascript required?

  • G


    I have just started using SI CAPTCHA and noticed it loaded si_captcha.js on every page. Is this javascript required, you say in the plugin description – “Features: … JavaScript is not required …”

    So I edited out reference to the si_captcha.js in si-captcha.php, to stop js file loading, and the plugin still works fine.



Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Mike Challis


    It is needed for the captcha refresh button. It was added in a recent version. I will update the readme.

    Although if you set the setting to use sessions for the captcha, the javascript file does not load because it is not needed.
    Just un-check the setting: “Use CAPTCHA without PHP session”. Be sure to test and make sure it is working because some servers have broken sessions.



    I am using it on WordPress MU for all sites, I also use the anti-spam plugin NoSpamNX to doubly secure my sites. I previously used WP-Spamfree but recently been receiving quite a bit of comment spam, so dumped it, and since using both SI CAPTCHA and NoSpamNX am down to zero spams!
    And yes I have tested as a human commenter on sites and your plugin works great.
    I just like to remove unnecessary javascripts from code for faster page loads.

    Does the si_captcha.js file need to call the /health/lib/yui/container/assets/skins/sam/a3Slider.php file using a document.write? I found this tucked away (pushed way over to the right on the last line of code) and I’m not sure why. I have this path and yui library, but I know I didn’t ad this line to your this js file… I have commented the code out, but was curious if this was put there on purpose?


    Plugin Author Mike Challis



    NO that code is NOT included in the official si_captcha.js source!
    is your site hacked?


    Hi Mike,

    Thanks. I was pretty sure it wasn’t part of your code… didn’t make a lot of sense. I’m verifying all my site code – I do think it’s been hacked, at least at some point in the past by an automatic type script. Thanks for the link to the FAQ as well.



    Did you ever get the js in header removed?

    I don’t care for refresh button especially if it requires java. I also don’t want to use php sessions and I don’t have that enabled in php.ini and dont want to enable it for just one plugin.

    I found this in si-captcha.php:
    if ( isset($si_captcha_opt['si_captcha_disable_session']) && $si_captcha_opt['si_captcha_disable_session'] == 'true')

    changed to:
    if ( isset($si_captcha_opt['si_captcha_disable_session']) && $si_captcha_opt['si_captcha_disable_session'] == 'false')



    hydn, i still resort to hack. i tried Mike Challis suggestion to uncheck setting: “Use CAPTCHA without PHP session”, but my page just hangs – i use wpmu with wp-supercache so runs better without session – so i have it selected.
    every upgrade of the plugin, i edit the si-captcha.php:

    search for line containing “captcha.js”

    function si_captcha_enqueue_scripts(){
       wp_enqueue_script('si_captcha', plugins_url('si-captcha-for-wordpress/captcha-secureimage/si_captcha.js'));

    remove everything shown above, save and upload.

    works great!

    Do u have display php errors on? Thats a few lines further down correct?

    Never mind this just adds php sessions!!! Use redbot.org to check.

    I just want it with no refresh.

    Ok removed plugin. I now use this:

    It’s officially supported by Google:

    Plugin Author Mike Challis


    The next version will have this improvement:
    – The javascript is only loaded on pages when it is conditionally needed, and it loads in footer.



    Thanks Mike for your fine plugins, I use both SI CAPTCHA Anti-Spam and Fast Secure Contact Form. They both work fine, but having a wpmu setup with multiple sites, I sometimes had to go thru all sites to change config, and it was just easier to snip references to captcha.js. I generally like to minimise use of js for faster page loads.
    Great plugins, I include them here:
    Best Plugins for WordPress 3 and WordPress MU

    Plugin Author Mike Challis


    The version is not out yet but you can upgrade to the latest code by replacing the files by FTP with the files in the current download:



    PS: I use SI CAPTCHA Anti-Spam as mu-plugin

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] [Plugin: SI CAPTCHA Anti-Spam] SI CAPTCHA – Javascript required?’ is closed to new replies.