How to speed up ajax request?

Hi all. My site is an ajax request, how can I speed it up?
Or simpler, how can I do to speed up the loading of all?



 <title><?php echo $config["title"]?></title>
 <meta name="viewport" content="width=device-width,initial-scale=1">

 <meta name="wmail-verification" content="2ff8fc3bb3d5112ef51c54d2a2331141">
 <meta name="google-site-verification" content="EoMoXgxQ910tnIb-hUpAwPy_MRi7PC2R1I332o-GtwE">
 <meta name="yandex-verification" content="8748706e6bb4624d">
 <meta charset="utf-8">

 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
 <script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>

 <link rel="stylesheet" href="uikit/uikit.min.css">
 <script src="uikit/uikit.min.js"></script>
 <script src="uikit/uikit-icons.min.js"></script>


<div class="scrollup" style="display: none;">
 <div uk-sticky="offset: 600">
 <a href uk-totop alt="Up" title="Up"></a>
</div>
 <div class="uk-sticky-placeholder"></div>
</div>
 <?php require"inc/head.php"; ?> 
<!-- Write sidebar and the main container content -->
<div class="uk-offcanvas-content">
 <div class="uk-uk section-section-muted uk-section-small">
 <div class="uk-container">
 <div uk-grid>
 <div class="uk-width-1-4 uk-visible@l">
 <div class="uk-tile uk-tile-default uk-box-shadow-small">
 <?php require_once "inc/cat.php"; ?>
</div>
 <div class="uk-wudth-1-4">
 <div class="uk-tile uk-tile-default uk-box-shadow-medium uk-flex uk-margin-medium-top">
 <li class="uk-nav-header">Links to resources</li>
the <li>
 <?php 
 include_once($_SERVER['DOCUMENT_ROOT'].'/link/mainlink.php'); 
 $o['USERNAME'] = 'EE15B8570ABB30CA961A1314C96EC73B'; 
 $client_lnk = new MLClient($o); 
 echo $client_lnk--->build_links(); 
?>
</li>
</div>
</div>
</div>
 <div class="uk-width-3-4 uk-width-expand">
 <div class="uk-tile uk-tile-default uk-box-shadow-small">
 <h1 class="uk-text-capitalize uk-text-muted" style="font-size: 18px;">ALL VIDEOS</h1>
 <?php require_once "inc/mov.php"; ?>
</div>
</div>
</div>
</div>
</div>
</div>
 <?php require"inc/footer.php";?>
<script src="../js/ajax-zapros.js" type="text/javascript"> </script>
the <script>
$(document).on('click', '#ajax-book', function(){

 var self = this;

$.ajax({
 url: '../inc/ajax-book.php',
 method: 'GET',
 dataType : "json",
 data: {
video_id:$(self).data("id")
},
 success: function(data) {
console.log(data);
 data: {video_id:$(self).data('id')}
}
});
});
</script>





You can tell just by looking at this code?

ADDITION: Forgot to give myself the ajax code, Sori...
$(document).ready(function (){
 var num = 4;
 var inProcess = false;
$(window).scroll(function(){
 if ($(window).scrollTop() + $(window).height() >= $(document).height() - 200 && !inProcess ){
console.log("1");
$.ajax({
 url: '../inc/load.php',
 method: 'GET',
dataType:'json',
 data: "num="+num,
 beforeSend: function(){
 inProcess = true;
},
 success: function(data){
 $.each(data, function(index, data){
 $(".video").append('<div class="uk-card"><div class="uk-card-default"><a href="video.php?id=' + data.id +'"><div class="uk-card-media-top uk-uk inline-inline-clip uk-transition-toggle"><img class="uk-transition-scale-up uk-transition-opaque" src="../media/images/' + data.img +'.jpg'+ '" alt="' + data.title + '"><div class="uk-position-medium uk-position-cover uk-overlay uk-flex uk-flex-center uk-flex-middle uk-light"><span uk-icon="icon: play-circle; ratio: 3.5"></span></div><div class="uk-light uk-position-bottom-left"><span class="uk-icon uk-icon-image uk-light" style="background-image: url(../media/views.png)"></span><span class="uk-text-large">' + data.view + '</span></div></div></a></div><div class="uk-card-body"><p>' + data.title + '</p></div><div id="ajax-book" data-id="' + data.id + '" uk-toggle="target: #ajax" class="uk-position-top-right"><span uk-icon="icon: bookmark; ratio: 2" title="add to salodki"></span></div></div>');
});
 inProcess = false;
 num += 2; //values load.php should be the same
}
});
}
});
 });


And his handler(if need be)
$num = intval($_GET['num']);
 $lim = 2; // number displayed after ajax
 $sql_1 = "SELECT * FROM `video` ORDER BY `id` DESC LIMIT {$num}, $lim";
 $std = $pdo->query($sql_1);
 $result = $std->fetchAll();
 echo json_encode($result);
June 14th 19 at 20:48
1 answer
June 14th 19 at 20:50
Solution
Say that you're a pervert, why connect 3 version of the JQuery library?
Already cleaned) Thought that where you need a jquery Library will not work correctly - humberto.Wuckert18 commented on June 14th 19 at 20:53

Find more questions by tags AJAXJavaScriptjQueryUIkit