Ajax call not working as expected in Firefox
Ajax call not working as expected in FirefoxOkay, I had this peculiar problem of my web form updating the relevant tables when being called from Google Chrome and not doing so, when the call was made through Firefox.
The form went into sleep and did not respond after the Submit button was clicked. It looked as if the Ajax call was in indefinite loop in Mozilla Firefox.
As we went digging for reasons that this was happening, we realised that Firefox is strict about how data has to be sent to it.
Google Chrome is someone who tries to make sense out of the data and so, we got away with Chrome.
So, we understand that what we need to return from a php, which is being called through an ajax request, is content preceded by a header, which indicates the type of content that follows.
It could be any of these types as defined below.
Header Content-type: Common examples: