JQuery ajax content type for IE with ajaxSubmit

I am using jQuery Form plugin to submit forms. Server response - json response.

At first it worked in all browsers except IE. Now I started working in IE with contentType: "application/x-www-form-urlencoded;charset=utf-8".

But I have some forms with the ability to upload images. And in these forms, IE requests a download as soon as I submit the form.

How can i fix this?

The ajaxForm plugin suggested using iframe: true, but that was not my solution.

+3
source share
1 answer

I have found the answer. The problem is that the content type is being sent back by the server. I changed this to "text / html" and worked in all browsers.

, . - , , "application/json", , .

+1

Source: https://habr.com/ru/post/1791494/


All Articles