Duplicate network calls | Community
Skip to main content
New Participant
February 1, 2023
Question

Duplicate network calls

  • February 1, 2023
  • 1 reply
  • 652 views

Hi 

 

I have implemented Twitter pixels through launch which are base code and event code and I see there are duplicate calls in browser network which is supposed to be two.

eci-3 and eci-4 but they are duplicate. Any help.

Regards

Anwar

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

ranjithd
New Participant
February 22, 2023

Post the code of the object you are clicking on, and the event that is firing twice. Usually this is caused by declaring it in the OnClick event, as well as Handles Something.click in the even prodecdure.

 

You have something outside the example triggering another .click(), check for other handlers that are also triggering a click event on that element.

 

$('selected').unbind('click').bind('click', function (e) {
  do_something();
});

Strange behaviour which I was experienced also. So for me "return false" did the trick.

$( '#selector' ).on( 'click', function() {
    //code
    return false;
});

 You can also try with different methods,

 

 $('#id').off().on('click', function() {
        // function body
    });
    $('.class').off().on('click', function() {
        // function body
    });

 

$('.class').on('click', function () {...your codes...});

$(document).on('click','.class', function () {...your codes...});