[Answer]-AJAX and 404 equivlant

1👍

I’d recommend a 405 Method Not Allowed, because AJAX isn’t allowed at that synchronous address, or a 406 Not Acceptable because the request expects (I assume) JSON or XML, and you’re returning HTML (again I assume). I’m not aware of an industry standard here, but I could be wrong.

0👍

You should look for the existence of the Ajax header in user request: ‘HTTP_X_REQUESTED_WITH’

Leave a comment