I take advantage of a type on my WordPress web site. The info is shipped asyncronously to wp-ajax.php. This works high-quality in all browsers, however within the Instagram app browser in iOS I get the error “Load failed”. The fascinating factor is that the request nonetheless arrived on the server and was processed accurately. What may very well be the rationale for this?
<script>
doc.querySelector('.gm_courseform').addEventListener('submit', perform(occasion) {
occasion.preventDefault();
const type = this;
type.classList.add('sending');
const submitButton = doc.getElementById('submit_button');
const originalButtonText = submitButton.textContent;
submitButton.disabled = true;
submitButton.textContent = "Wird geladen...";
doc.querySelectorAll(".form-message").forEach(el => el.take away());
const formData = new FormData(this);
formData.append('motion', 'create_booking');
fetch("<?php echo admin_url('admin-ajax.php'); ?>", {
methodology: "POST",
headers: {
"Cache-Management": "no-cache, no-store, must-revalidate",
"Pragma": "no-cache",
"Expires": "0"
},
physique: formData,
})
.then(response => response.json())
.then(information => {
// [...]
})
.catch(error => {
// [...]
});
</script>