I have this jQuery code in my JSP page (jQuery 1.7.2) :
function Header() {
this.add = function ( parentDiv, leftToolbar, rightToolbar ) {
really it saved my time, IN IE 11, we should put cache:false for get ajax to get resolved this issue
console.log is undefined outside of developer mode in IE. I like to just make a variables
var console = {log: function(){}};
for when I'm not debugging.
All instances of console.log()
need to be removed from your script in order for it to work in IE9 without it being in developer mode.
UPDATE I'm glad this answer has helped a few people. Just thought I'd update this answer with a simple solution I have been using from HTML5 Boilerplate:
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
var length = methods.length;
var console = (window.console = window.console || {});
while (length--) {
method = methods[length];
// Only stub undefined methods.
if (!console[method]) {
console[method] = noop;
}
}
}());
Place this before your code and it should help you avoid any console errors in browsers that lack a console.
I had this problem and I had all the console references commented out in the scripts, but it was still failing in IE only (11). I found the solution was to add cache false to my AJAX calls.
$.ajax({
**cache: false,**
type : 'GET',})
All my inputs have the attribute autocomplete="off"