I’ll start with the fact that I use ajax to load elements and noticed that without manually reloading the page, the memory in the tab began to grow. Looking at the console, I was convinced that the problem was in the images.
And so I load the data using ajax, then the clicks on the element and the image is drawn in the new element something like this
let image = new Image();image.src = item.url;image.onload = function() { previewContent.css('background-image', 'url('+ item.url +')'); image = null;};
(loading method is not important)
to close I use previewContent.remove()
, but this does not remove from Application - Frames - Image
I repeat loading data from ajax, open the image and see that inside Application - Frames - Image
the same image has been added again and the memory of the tab has increased.
What can you do about it? or refuse to load data from ajax?