Coming from flash it was always necessary to drop bitmap data in my slideshows so that I wasn’t just loading more and more data into memory and thus weighing the program down.
Now that I’ve started building these slideshows using jQuery, I’m wondering if I should be cognizant of the same issue.
For instance, it’s easy to keep appending images to a div, burning through arrays until the cows come home. But, I’m wondering if I should be removing the covered up images in the mean time or is my browser smart about layered bitmaps.
Thoughts?
You should remove the divs that are not visible (or some other logic) from the DOM, otherwise it will keep growing. Your browser only knows about element in the DOM, if the element is attached to the DOM it needs memory to retain it.