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
1. Introduction to inode To understand inode, we ...
When the server needs to be started during develo...
Table of contents 3 ways to deploy projects with ...
We are not discussing PHP, JSP or .NET environmen...
Copy code The code is as follows: <hr style=&q...
1. Build a Docker environment 1. Create a Dockerf...
Using the internal function instr in MySQL can re...
This article shares the specific code of jQuery t...
Quick Reading Why do we need to monitor SQL state...
Table of contents 1. Constraint concepts and clas...
The cut command in Linux and Unix is used to cu...
Query Cache 1. Query Cache Operation Principle Be...
<div class="sideBar"> <div>...
1. Introduction A few days ago, I encountered a p...
Table of contents Prepare Five weapons for…in Obj...