Detailed solution for Error (c00ce56e) When Ajax is used in php, ajaxc00ce56e

Source: Internet
Author: User

Detailed solution for Error (c00ce56e) When Ajax is used in php, ajaxc00ce56e

When writing code today, ajax is used to obtain data asynchronously. In firefox 13.0, everything works normally. in IE of each version, IE6 is normal, but IE8 reports an Error "Error: this operation cannot be completed due to the error c00ce56e ". Because firefox is a browser for code writing and testing, it generally ensures the correctness under it first. Everything in firefox looks so normal.

My environment is: js Code is based on jQuery, and various js class libraries are loaded asynchronously. The request method is 'get', And the return format is 'html ';

Due to the completion of the previous work phase, I was prepared to check whether it was normal under IE. At first glance, I was a little depressed and did not respond. The data was not displayed. When inserting data into the DOM, there is no response at all.

Continue debugging, and then at $. when alert passed the errorThrown parameter to the callback function in the error parameter option of the ajax request, the following error is returned: "This operation cannot be completed due to the error c00ce56e. ", This is critical because the pop-up error has code, so it is a traceable error.

By the way, in firefox, ajax requests return success, while in IE, errors. According to the error message, I searched for the relevant answers online. The more useful way is to find out the differences in encoding. After searching, I found that the encoding of my html page was UTF-8, And the header ('content-type: text/html; charset = UTF-8 ') was set in my php program '); this is depressing, and there is no problem in the same way. Later, when I checked the page source code, I found how utf8 was used. I lost a '-', '-', and where did I go, later, we found that charset utf8 was set in the original nginx configuration; the forced character encoding was utf8, And it was normal to restart nginx...

Based on this problem, we can summarize the following experiences:

Firefox has better fault tolerance than IE. Based on the HTML5 design philosophy, firefox performs better. Does such fault tolerance pose security risks because it has not been tested, so I do not know for the moment;
Maintain consistency of various codes of the program as much as possible. Otherwise, unexpected errors may occur. UTF-8 is recommended;




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.