title: How can I detect if the window really resized in IE8 standards mode?
body: <p>My site has many style sheets customized for varying screen widths. As the browser is resized, the <code>window.onresize</code> event checks that a resize actually took place by looking at <code>document.documentElement.clientWidth</code>. If it did, it turns on successively larger style sheets until scrollbars appear. Then, it turns them off in reverse order until scrollbars disappear. Scrollbars are detected by comparing <code>offsetWidth</code> to <code>scrollWidth</code>.</p>
  
  <p>In IE8, two new problems confound detection of a resize. One, <code>onresize</code> fires whenever scrollbars appear or disappear, and two, <code>d.dE.clientWidth</code> reports the width without scrollbars, a break from IE7 and all other browsers. My site now frequently gets trapped in a loop in which the <code>onresize</code> logic activates a larger style sheet, which creates scrollbars, which then triggers another resize event that cannot be filtered out because the <code>clientWidth</code> has changed due to scrollbars appearing or disappearing. This would be a trivial fix if IE8 had something like <code>outerWidth</code> I could check.</p>