Cacomania: Prevent impatient users to click a link several times

Cacomania

Prevent impatient users to click a link several times

Guido Krömer - 17. September 2012 - Tags: ,

  • Fact 1: Users are very impatient.
  • Fact 2: Some pages have a really long request time.
  • Fact 3: Users try to improving the request time by clicking several times the same link.

This can be bypassed by disabling the links on a page when they got clicked.

$('.one_click_link').click(function() {
    $(this).click(function() {
        return false;
    });
})

This solution has one disadvantage, if the user decides to click another link and reverts his decision the already clicked links are still disabled. This is the reason I used the class "one_click_link" which will be assigned to "problematic" links, instead of giving all links on a page this availability using $('a')...