标签:
参考 http://stackoverflow.com/questions/7210507/ajax-post-error-refused-to-set-unsafe-header-connection
使用ajax时,chrome报出异常:Refused to set unsafe header "Connection"。
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
在XMLHttpRequest不允许设置一些headers,他们会被浏览器自动设置。
Refused to set unsafe header "Connection"
标签:
原文地址:http://www.cnblogs.com/tinyking/p/5938959.html