As I already mentioned in title sometime the ajax request respond internal server error. I am working on an application i which a send a lot of ajax requests, some requests are sent after regular interval of time by using setInterval and setTimeout functions. On the other hand, some requests depend upon the user actions.
I am very confused sometime the ajax request give server error but why? If it was a syntax error it should give this error every time. Here is one of the the code of the ajax request from my requests
@if(Auth::check())
updateLastActivity();
@endif
function updateLastActivity(){
$.ajax({
headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
url:'',
type:'get',
success:function(data,status){},
complete:function(data){
setTimeout(updateLastActivity,5000);
}
});
}
How to resolve that issue.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2N27HXO
via IFTTT
Aucun commentaire:
Enregistrer un commentaire