Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question