After setting the iframe's src to 'about:blank', the memory will not be released if it is not set to "about:blank". You must also use iframe.document.write(''); This is the only way to clear the content, but after this processing there will still be about 500-1000K of memory remaining. This is the iframe bug of IE6. Dynamically created iframes will always consume some memory. Copy code The code is as follows:function clearIframe(id){ var el = document.getElementById(id), iframe = el.contentWindow; if(el){ el.src = 'about:blank'; try{ iframe.document.write(''); iframe.document.clear(); }catch(e){}; //The above can clear most of the memory and document node records. //Finally, delete this iframe. document.body.removeChild(el); } } clearIframe('iframe_id'); |
<<: Detailed explanation of the implementation of nginx process lock
>>: Navicat for MySQL tutorial
Table of contents 1. Learn to return different da...
This article uses examples to illustrate the prin...
This article shares the specific code for JavaScr...
Install linux7.2 Internet access configuration on...
Meta tag function The META tag is a key tag in th...
Table of contents Partitioning mechanism SELECT q...
JSONObject is just a data structure, which can be...
Fault description percona5.6, mysqldump full back...
Table of contents 1. IDEA downloads the docker pl...
The GROUP BY statement is used in conjunction wit...
1. Add PRIMARY KEY (primary key index) mysql>A...
1. First introduce several commonly used MySQL fu...
Use ifnull instead of isnull isnull is used to de...
Preface HTTP is a stateless communication protoco...
1. Enter the directory where your project war is ...