Common techniques of cleaning memory in jquery
I'm trying to debug some code that another developer wrote in jquery since page loads really slow and crashes the browser. I need an advice how to test , debug big amounts of jquery code. Need some good techniques in memory cleanup in point of view of existing code written by somebody else. All the suggestions , tools , relevant links will be greatly appreciated. I'm using firebug to debu开发者_Python百科g the code.
Thanks for your time.
QUnit http://docs.jquery.com/Qunit
go through this onload function , whatever code inside the below method gets executed onthe load of the page.Go through the code and identity all for loops , global variables , string concatination , null checks , div exists checks...
With the above things you can fix some...issues
run profiling in firebug also ,
$(document).ready(function() {
// check for all null checks properly
// check global variables
// check forloops
// check circular references
});
精彩评论