kajdehoop
kajdehoop

Reputation: 527

Jquery post not working on Apple devices

I'm running into a strange problem with AJAX calls on Apple devices. When doing a simple $.post request to a PHP file it works perfectly on Windows and Android, but the request is not doing anything when running on an iPhone or Mac. The problem is not in Safari, because the request is not working in Chrome on a Mac either. I've already tried adding $.ajaxSetup({ cache: false }); line to disable the cache, but this didn't solve the problem

Upvotes: 2

Views: 577

Answers (1)

kajdehoop
kajdehoop

Reputation: 527

I solved my problem! After the $.post function I was doing a window.location redirect, but this made the call fail. However on Windows the data was still coming through into the database while it didn't come through on Mac. I placed the redirect in a .done() after the request, and now it works.

Upvotes: 1

Related Questions