I have a script that process data with some ajax call, depending on the user clicks and changes the call is done once again(works fine).
$.ajax({
type: "POST",
url: "process_data.php",
data: { action: "first_action",data:data},
dataType: 'json',
success:function(result){
//process
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
}
});
To save time I want to execute some queries in my process_data.php
file only during the first ajax call and save them into variables so I dont have to execute the same queries in every call.
How to catch ajax first call ?