title: How do I get out of ajax infinite loop?
body: <p>I started a video project. I wrote my video player myself. I'm using javascript, jquery, asp.net and c #.</p>
  
  <p>         I made the video stop in seconds that the user set and the user asked questions to come to the screen. The video stops. The question is coming. Clicking an answer option. The clicked option is saved in the database (for analysis).</p>
  
  <p>        I send my data to the server side via ajax. It works perfectly when you answer questions instantly. But I wait for a certain amount of time I click the button, I can't skip the question. The question does not go from the screen as if it entered an infinite loop. I bring my questions to the screen with the css I created with Z-index.</p>
  
  <p>         I tried "cache: false" in ajax. But it didn't. Chrome, Edge and Android waiting for a certain period of time I encounter this problem. But when the first question comes up on the screen in Ios and Safari, the question is stuck if I don't wait for a certain time ...</p>
  
  <p>The following is the ajax code that runs when the first option is clicked.</p>
  
  <p>I'd appreciate it if you helped. I've been dealing with this problem for about two weeks.</p>
  
  <pre><code>c1.onclick=function(){
  
      $.ajax({
  
              type:"POST",
              url: "VideoPlayerDemo.aspx/SonucKaydet", 
              data:'{user:'+JSON.stringfy(user)+',VKodu:'+JSON.stringfy(VKodu)+',SoruKodu:'+JSON.stringfy(user)+'}',
              contenttype:"json",
              success:function(data){
                  if(document.getElementById("my_ad").style.visibility !="hidden")
                  {
                      document.getElementById("my_ad").style.visibility ="hidden"; 
                  }   
              },   
          }),   
      }),
      v.play();
  };
  </code></pre>