chrome下:Refused to set unsafe header "Connection"
今天在做jquery遇到一个问题,只在chrome下出现此问题,其他浏览器正常。chrome控制台报Refused to set unsafe header "Connection" ,且不影响功能的正常运行。代码如下:
function parseXml(p) {
$.ajax({
url:"/injector/parse_xml.php",
type: "POST",
async: false,
cache: false,
dataType: "json",
error: function(){alert('fail');},
success: function(series) {
if(!series || !series.category) {
return;
}
var root = series;
var categories = root.category;
for(var j=0; j<categories.length; j++) {
var category = categories[j];
var categoryName = category["@attributes"].name;
var privileges = category["@attributes"].privileges;
if(privileges == p) {
appendCategory(categoryName);
var items = category.item;
for(var i=0; i<items.length; i++) {
var item = items[i];
var itemName = item.name;
var itemUrl = item.url;
appendItem(itemName, itemUrl);
}
}
}
}
});
}