Detailed solution to error (C00CE56E) when using Ajax in PHP _php instance

Source: Internet
Author: User
Today in writing code, using AJAX asynchronous to get the data, in Firefox 13.0 all right, and in the various versions of IE Test IE6 Normal, IE8 will error "Error: Due to error c00ce56e caused this operation cannot be completed." Because Firefox is my browser to write code and test, so generally will be the first to ensure that the correctness below it, Firefox everything looks so normal.

My environment is: JS code is based on jquery, the use of asynchronous loading of each JS class library, the request is ' GET ', return the format ' HTML ';

As a result of the previous phase of the completion of the work, so ready to see under IE is normal, a look under, a little depressed, no response. The data is not displayed. Then under IE, F13, found that the process of requesting data under IE is not a problem, but also in the control Panel to obtain data, but when I use $ (' #id '). HTML (data), when inserting data into the DOM, nothing happens.

Continue debugging, and I get the following error when I alert it to the Errorthrown parameter of the callback function in the error parameter option of the $.AJAX request: "The operation cannot be completed because of an error c00ce56e. "This is critical because the error that pops up is code-based, so this is a trace error.

By the way, in Firefox, Ajax requests are returned to success, and IE is returned with an error. According to this error, search the relevant answers on the Internet, find the more useful is that the code is inconsistent. After finding out that my HTML page encoding is Utf-8, and in my PHP program is set to the header (' Content-type:text/html;charset=utf-8 '); This is depressed, the same is no problem ah, later to view the page source code when found how is utf8, less a '-' this '-' ran where, later found that the original Nginx configuration set charset UTF8; Force character encoding to UTF8, Quickly plus restart Nginx all normal ...

The following experiences can be summarized according to this question:

Firefox is more tolerant than IE, to HTML5 design ideas, Firefox performance better, for such a fault-tolerant ability, whether it will cause security risks, because not tested, so temporarily do not know;
Try to keep the program's various coding consistency, otherwise unpredictable errors may occur, recommend the use of utf-8;

  • 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.