{"id":429,"date":"2002-10-29T16:08:42","date_gmt":"2002-10-29T21:08:42","guid":{"rendered":"http:\/\/www.ashleyit.com\/blogs\/brentashley\/?p=429"},"modified":"2002-10-29T16:08:42","modified_gmt":"2002-10-29T21:08:42","slug":"an-alternate-approach","status":"publish","type":"post","link":"https:\/\/ashleyit.com\/blogs\/brentashley\/2002\/10\/29\/an-alternate-approach\/","title":{"rendered":"An alternate approach"},"content":{"rendered":"<p>Chris at <a href=\"http:\/\/dithered.com\">dithered.com<\/a> reports on yet another NS4 hack:<\/p>\n<blockquote><p>\n<a href=\"http:\/\/scottandrew.com\">Scott Andrew<\/a> 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):<\/p>\n<p>1)Pointing the src of the layer to a special local page, called &#8220;blank.html&#8221; <\/p>\n<p>2)In blank.html, there&#8217;s an in-body script that calls back to a function in layer&#8217;s parent (the window) <\/p>\n<p>3)The function document.writes() the content into the layer (no open() or close())\n<\/p><\/blockquote>\n<p>I&#8217;ve got an idea &#8211; rather than using blank.html and using document.write, why not test for NS4 and redirect to a page that says &#8220;Quickly! You must download and install a new browser right now or aliens will swoop down and amputate your penis!&#8221;.  Anyone who&#8217;s still using NS4 is obviously stupid enough to fall for that or at least working for some idiot who will fall for it.<\/p>\n<p>Presto &#8211; no more memory leak.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chris 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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-429","post","type-post","status-publish","format-standard","hentry","category-blather"],"_links":{"self":[{"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/posts\/429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/comments?post=429"}],"version-history":[{"count":0,"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/posts\/429\/revisions"}],"wp:attachment":[{"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/media?parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/categories?post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ashleyit.com\/blogs\/brentashley\/wp-json\/wp\/v2\/tags?post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}