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;