4
Analyze the code below
function update(){
$.ajax({
url : 'http://localhost/sistema',
type : 'get',
dataType : 'json',
success : function( data ){
console.log('Mostrar dados: '+.data.dado);
}
})
}
setInterval(function () { update() }, 3000);
ajax sends a 'get' request to the server that returns the data.
So far so good.
This request is made every three (3) seconds
Only that approximately after about 20 runs the computer all starts to lock.
The backend is in Laravel with Mysql
Testing by Postman he returns fast and normal
Does it have something to do with PHP?