jQuery(document).ready(function (jQuery) { jQuery(window).on("load", function (e) { var myWidth = 0, myHeight = 0; if (typeof (window.innerWidth) == 'number') { // Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { // IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { // IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } windowWidth = jQuery(window).width(); windowHeight = jQuery(window).height(); if (windowWidth != myWidth) { windowWidth = parseInt(myWidth); windowHeight = parseInt(myHeight); } jQuery.cookie('windowHeight', myHeight | 800, { path: COOKIE_PATH }); jQuery.cookie('windowWidth', myWidth | 600, { path: COOKIE_PATH }); if (DEBUG_autosize.match(new RegExp("cookies", "gi"))) { cookies = jQuery.cookie('*'); for (var i in cookies) { jQuery("div").append("
" + i + " = " + cookies[i]); }; } jQuery.cookie('autosize_reload', "ok", { path: COOKIE_PATH, expires: 1 }); if (reload == "true") { document.location = document.location; } return; jQuery.cookie('autosize_reload', "ok", { path: COOKIE_PATH, expires: 1 }); if (reload == "true") { document.location = document.location; return; // document.location.reload(false); // from cache try { var retval = document.location.reload(true); } catch (err) { var retval = window.location.reload(); } } } ); });