Answer the question
In order to leave comments, you need to log in
Not passing AJAX requests?
Good day. Error when trying to send AJAX request in console: jquery-2.1.4.min.js:4 Mixed Content: The page at ' https://*****.com/cargo/calc-temp/ ' was loaded over HTTPS , but requested an insecure XMLHttpRequest endpoint ' http://****.com/cargo/handler.php '. This request has been blocked; the content must be served over HTTPS.
There are no problems on the local computer.
Request:
$.ajax({
type: "POST",
url: "handler.php",
data: form_data,
success: function(response) {
},
error: function(response) {
alert('Error');
}
});
Answer the question
In order to leave comments, you need to log in
If the main site is loaded via https, then all resources must be requested via a secure protocol, so the link to handler.php must be with https. Actually, this is indicated by the error:
This request has been blocked; the content must be served over HTTPS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question