L
L
leonardogun2019-09-11 01:59:59
AJAX
leonardogun, 2019-09-11 01:59:59

CPU load when sending an AJAX request, even an empty one?

Good day!
Sending a simple ajax request. For example 1 variable.
And at the moment of sending the request, the load on the CPU jumps from 0.33% to 1%.
Is this normal at all?
Even if you send an empty request.

<script src="/js/jquery-2.1.4.min.js"></script>
<script>
function lol(){
  var sum = $('#sum').val();
  $.ajax({
    url: "lol.php",
    type: "post", // метод передачи
    dataType: 'json',
    data: { // что отправляем
      "sum": 	sum
    });
}
</script>

<input type="button" onClick = "lol()" value="send"/>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2019-09-11
@SilenceOfWinter

I assume lol.php is located on the local server? + perhaps the load is given by browser extensions / debugging panel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question