Title: Possible High Load to Browser? Post by: poeziafree on March 13, 2022, 09:54:33 AM Hello
As I have noticed, creating a new window programmatically, appends the Panel to Body each time the window is created. Besides, comboboxes and other functionalities are also appended to the the Body, thus storing a huge amount of code in browser console. I am wondering whether it can affect the speed of the ajax-based website if the user doesn't refresh the page but loads new content dynamically over and over again? For example this code: Code: var win = $('<div id="CreateUserWindow"></div>').appendTo('body'); Each time I create the window using this method, old windows still remain in the console and new windows are added. Is it ok? How can I remove the appended code from Body once I close the Window, for example? Is it ok to leave it appended to the Body? Thank you in advance Title: Re: Possible High Load to Browser? Post by: jarry on March 14, 2022, 04:33:14 PM The code below creates only one window. You can call the 'refresh' method to load content from remote, or just replace the content with the jquery native 'html' method.
Code: var win = $('#CreateUserWindow'); |