Closed Bug 241165 Opened 20 years ago Closed 20 years ago

washingtonpost.com - refreshes on resize

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: cwhitt, Unassigned)

References

()

Details

(Keywords: top100, top500)

Firefox 0.8/Win98

washingtonpost.com refreshes on resize.  This should not happen.

http://bugzilla.mozilla.org/show_bug.cgi?id=235871#c11 might be an explanation
for this, though I can't tell for certain from the page source.  Quoting the
comment:
<i>

As far as I can tell, the cause is as follows:

1)  Websites detect a 'Netscape' browser

2)  Erroneously expecting old NS 4.x behavior, the site reloads
    the page on resize using javascript onResize
</I>

See also bug 121716 for an older problem with refresh on page load that listed
washingtonpost.com as an example URL (though this does not seem to be the same
problem).
The offending code is:

if(!window.saveInnerWidth) {
  window.onresize = resize;
  window.saveInnerWidth = window.innerWidth;
  window.saveInnerHeight = window.innerHeight;
}

function resize() {
    if (saveInnerWidth < window.innerWidth ||
        saveInnerWidth > window.innerWidth ||
        saveInnerHeight > window.innerHeight ||
        saveInnerHeight < window.innerHeight )
    {
        window.history.go(0);
    }
}

which is located in:
http://media.washingtonpost.com/wp-srv/homepagessi/_browser.js

This code does not affect IE because IE does not implement the innerWidth and innerHeight properties. 
The solution to this problem is to check for Netscape 4.x before installing the onresize handler.
Has anyone contacted wash post on this issue?
Keywords: top500
Conforming summary to TFM item 10 at 
http://www.mozilla.org/projects/tech-evangelism/site/procedures.html#file-new
Summary: washingtonpost.com refreshes on resize → washingtonpost.com - refreshes on resize
we introduced a hack a while back that should prevent these resize issues. It no
longer resizes.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.