I use the Safari browser to view my web page, which is rich in Javascript. I see that Safari takes up a lot of memory (500-900 MB) when browsing a web page and performing various operations. I want to know if I need to delete DOM objects using, for example var elem = document.getElementById('Id1');, to optimize the use of this memory? If any other pointers please suggest. Also, how can we remove this DOM object in the easiest way?
var elem = document.getElementById('Id1');
Thanks Siddhart
One point of clarification. Your sample code does not create a DOM node; it just extracts a link to an existing node:
, :
elem.parentNode.removeChild(elem);
DOM , ( ).
, DOM javascript ( , DOM JS Garbage Collectors).
:
webkit . , Safari, Chrome.
/.
This is a good tutorial on using the Safari Inspector utility.
Source: https://habr.com/ru/post/1793842/More articles:Independent mobile applications for the platform - androidCreate table in hbase - hbasehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1793839/how-to-get-an-facebook-access-token-for-url&usg=ALkJrhirNCIbvbBGP4V1zaDJi2L3S9ebBQLow grip and tight grip - c ++Полиморфизм php - вызов родительской функции в полиморфной дочерней функции - objectwant to install the same application, but with a different name in WP7 - c #jQuery: getting the level of the selected li - jqueryusing groovy with stripe web framework - javamercurial - clicking on a new instance of EC2 - amazonDeploying Capistrano and schema.rb - ruby-on-railsAll Articles