Catcha Monkey Not Working

Sometimes when you test your catcha you will find that it is not activating when you close the page.

It's a security feature in Firefox (possibly in other browsers).

There is a Javascript event that "fires" before a page is "unloaded" - we hook into this event to show the prompt and redirect the user.


The browser only fires this event IF you have "interacted" with the page first - A simple scroll of a few lines counts as an interaction.

This is to prevent hijacking of links.

The reasoning (by the browser makers) behind it is that a person will at least scroll a webpage a little or do SOMETHING on it if they intended to go there so until you do, the event doesn't activate.

Here is a doc about it :

When you want to test your page, be sure to clear your caches etc first, to reset this setting, and then to "interact" (scroll) with your page before going to exit