Review 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 with the data.
So far so good.
This request is made every three (3) seconds
Only about after about 20 runs the computer starts to crash.
The backend is in Laravel with MySQL
Testing by PostMan it returns fast and normal
Does it have anything to do with PHP?