 <p>Have you tried on <strong>your php file</strong> , that?:</p> <pre><code>header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST/GET'); header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); </code></pre> <h2>UPDATE</h2> <p>As i read <strong>your error message above</strong> ,the error seems to be on the response, so i show you a screenshot of my request to the server(from my live web-app where i use CORS on the php), you need these headers on the response ,please see my response from the server:</p> <p><a href="https://i.stack.imgur.com/XYUdy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XYUdy.png" alt="enter image description here"></a></p> <p>Hope helps, good luck.</p>