I have abc.html page in which i am calling two javascript files as below in the head tag:-
<head>
<script src="script_files/1.js"></script>
<script src="script_files/2.js"></script>
</head>
In my 1.js file i am loading 3.js file using ajax call, as i don't need 3.js in all html files.
I am loading 3.js file by ajax call as shown below in the 1.js file:-
if(location.href.indexOf("abc.html") > -1 ){
$.ajax({
type: "GET",
url: 'script_files/3.js',
dataType: "script",
crossDomain: true,
jsonp: false,
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
success: function () {
console.log("Do Something");
},
async: false
});
}
Now, when I am loading my abc.html in which i need 3.js file. its going to the 3.js ajax call but before it completes the ajax call it comming to the 2.js file method.
This problem is occurring in only Microsoft Edge browser.