An alternate approach
October 29th, 2002Chris at dithered.com reports on yet another NS4 hack:
Scott Andrew writes with a solution to the NS4.x crashing when writing to layers that I mentioned yesterday. Apparently writing to an existing layer in NS4.x causes a big memory leak but the same problem is not encountered while doing a document.write() when loading a new document into a layer. This suggest the following solution (quoting Scott here):
1)Pointing the src of the layer to a special local page, called “blank.html”
2)In blank.html, there’s an in-body script that calls back to a function in layer’s parent (the window)
3)The function document.writes() the content into the layer (no open() or close())
I’ve got an idea – rather than using blank.html and using document.write, why not test for NS4 and redirect to a page that says “Quickly! You must download and install a new browser right now or aliens will swoop down and amputate your penis!”. Anyone who’s still using NS4 is obviously stupid enough to fall for that or at least working for some idiot who will fall for it.
Presto – no more memory leak.
The penis comment was below the belt but convinced me to switch.
by Ian Marsman October 29th, 2002 at 5:23 pm