Uncaught TypeError: x.getResponseHEADer is not a function
-
On all WP dashboards, I am receiving the following error in the console:
Uncaught TypeError: x.getResponseHEADer is not a function
This is thrown by all php files in the wp-admin folder. Specifically, it is thrown by this code block:
var testCompression = {
get : function(test) {
var x;
if ( window.XMLHttpRequest ) {
x = new XMLHttpRequest();
} else {
try{x=new ActiveXObject(‘Msxml2.XMLHTTP’);}catch(e){try{x=new ActiveXObject(‘Microsoft.XMLHTTP’);}catch(e){};}
}if (x) {
x.onreadystatechange = function() {
var r, h;
if ( x.readyState == 4 ) {
r = x.responseText.substr(0, 18);
-
h = x.getResponseHEADer
(‘Content-Encoding’);
testCompression.check(r, h, test);
}
};x.open(‘GET’, ajaxurl + ‘?action=wp-compression-test&test=’+test+’&_ajax_nonce=’+compressionNonce+’&’+(new Date()).getTime(), true);
x.send(”);
}
},check : function(r, h, test) {
if ( ! r && ! test )
this.get(1);if ( 1 == test ) {
if ( h && ( h.match(/deflate/i) || h.match(/gzip/i) ) )
this.get(‘no’);
else
this.get(2);return;
}if ( 2 == test ) {
if ( ‘”wpCompressionTest’ == r )
this.get(‘yes’);
else
this.get(‘no’);
}
}
};Is there an easy way to go about resolving this? Any insight as to the possible root cause of the issue?
- The topic ‘Uncaught TypeError: x.getResponseHEADer is not a function’ is closed to new replies.