Home > Backend Development > PHP Tutorial > Detailed solution to Error (c00ce56e) when using Ajax in php, ajaxc00ce56e_PHP tutorial

Detailed solution to Error (c00ce56e) when using Ajax in php, ajaxc00ce56e_PHP tutorial

WBOY
Release: 2016-07-13 10:15:25
Original
756 people have browsed it

Detailed solution to Error (c00ce56e) when using Ajax in php, ajaxc00ce56e

When I was writing code today, I used ajax to obtain data asynchronously. Everything was normal under Firefox 13.0. However, when IE6 was tested under various versions of IE, it was normal, but IE8 reported an error "Error: This is caused by the error c00ce56e. The operation could not be completed". Because Firefox is the browser I use to write code and do testing, I usually ensure the correctness under it first. Everything looks so normal under Firefox.

My environment is: the js code is based on jQuery, using asynchronous loading to load each js class library, the request method is 'GET', and the return format is 'html';

Since the previous work has been completed in stages, I am going to check whether it is normal under IE. At first glance, I am a bit depressed and there is no response. The data is not displayed. Then under IE, F13, I found that there was no problem with the process of requesting data under IE, and the data was also obtained in the control panel, but when I used $('#id').html(data); to insert data into the DOM , completely unresponsive.

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

By the way, the ajax request under Firefox returns success, but under IE, it returns error. Based on this error message, I searched for relevant answers on the Internet and found a more useful statement that the encoding is inconsistent. After searching, I found that the encoding of my html page is utf-8, and the setting in my php program is also header('Content-type: text/html;charset=utf-8'); This is all depressing, the same There is no problem. Later, when I checked the source code of the page, I found out why it was utf8. Where did the missing '-' go? I later discovered that charset utf8 was set in the nginx configuration; the forced character encoding is utf8. , quickly restarted nginx and everything was normal. . .

Based on this question, the following experience can be summarized:

Firefox has stronger fault tolerance than IE. In terms of HTML5 design ideas, Firefox performs better. Whether such fault tolerance will cause security risks is unknown because it has not been tested;
Try to keep the various encodings of the program consistent, otherwise unpredictable errors may occur. It is recommended to use utf-8;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/904915.htmlTechArticleDetailed solution to Error (c00ce56e) when using Ajax in php, ajaxc00ce56e When writing code today, use Go to ajax to get data asynchronously. Everything is normal under firefox 13.0, but under each...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template