skip to Main Content

Laravel – Javascript AJAX optimize speed

Can someone Identify wether this is good practice or needs improvement document.querySelector('#search-input').addEventListener('input', function(event) { var query = event.target.value; //console.log(query); var xhr = new XMLHttpRequest(); xhr.open('GET', '/admin-tasks/search?query=' + encodeURIComponent(query)); xhr.onload = function() { if (xhr.status === 200) { var tasks =…

VIEW QUESTION
Back To Top
Search