I'm skeptical.
Your Ajax code doesn't use the response data. It shouldn't matter what is in the response.
I suspect this bit of code, instead:
success: function(data) {
window.location.replace(url);
window.location.reload();
},
What are you trying to do with this?
As Jake points out, the window.location.replace() navigates to a new page. We can't guess what page, because we don't know the value of url.
window.location.reload() is never run.
What's the purpose of window.location.replace()? What's the value of url?
You don't have any need for a success function, since you just want to ignore any response. But you can use it for debugging, to print a message to the console on success. Or you can use to to perform any action on your page on success - maybe you'd like to give the user some feedback that it was successful.
What do you mean by "the calling program"? Are you referring to PHP, or Javascript?
You mentioned that your PHP returns JSON. But you don't do anything with the response. You don't need it?