From The Annals Of Browser Hacks
Aug. 9th, 2010 01:38 pmMany people deride IE for being a POS to code for (and this is much deserved). But there are many things that used to be worse back in the day. After trying today to get IE7 to behave the way I wanted I remembered some code I wrote for Netscape 4 about 10 years ago.
See Netscape 4 had this horrible resize bug. If you used absolutely positioned elements in your page, and the user tried to resize their browser, you'd lose all of the positioning. Yes, the folks at Netscape must have figured nobody would fiddle with their browser at all. This caused all sorts of issues when I was building Assembler. So every project had to add extra code just for NS4 like so:
Basically what this did was figure out if the browser window got larger or smaller, and when it did, to refresh the page. Then the positioning would reset and work fine.
I hate IE and all the wasted time it's given me in my job, but at least it doesn't have anything this horrible in it. Thankfully this is knowledge I no longer need in my career. But at least it reminds me when I'm wrangling with some browser bugs, "this too shall pass". Someday.
See Netscape 4 had this horrible resize bug. If you used absolutely positioned elements in your page, and the user tried to resize their browser, you'd lose all of the positioning. Yes, the folks at Netscape must have figured nobody would fiddle with their browser at all. This caused all sorts of issues when I was building Assembler. So every project had to add extra code just for NS4 like so:
function redrawInit() { if (ns4) { document.ASMBLR = new Object; document.ASMBLR.redraw = new Object; document.ASMBLR.redraw.winWidth = window.innerWidth; document.ASMBLR.redraw.winHeight = window.innerHeight; window.onresize = redraw(); } } function redraw() { if (document.ASMBLR.redraw.winWidth != window.innerWidth || document.ASMBLR.redraw.winHeight != window.innerHeight) { document.location = document.location; } }
Basically what this did was figure out if the browser window got larger or smaller, and when it did, to refresh the page. Then the positioning would reset and work fine.
I hate IE and all the wasted time it's given me in my job, but at least it doesn't have anything this horrible in it. Thankfully this is knowledge I no longer need in my career. But at least it reminds me when I'm wrangling with some browser bugs, "this too shall pass". Someday.