I recently asked a question, about a performance with jQuery (jQuery removing elements with event handlers).
I was worried about the event handlers in a deleted product list, but now I have similar issue with images. My program is still in development, so I added the same image for every product. My app is loading via HTTPS and I noticed a warning in the console:
The page at 'https://www.facebook.com/app/id?ref=ts' was loaded over HTTPS, but displayed insecure content from 'http://something.com/image.jpg': this content should also be loaded over HTTPS.
Of course, this is a meaningful warning, I understand it, BUT! When I update my product list it loads it again. When I update the page again, it warns for this problem 2 times, then 4 times, 8, 16, 32, 2^n...
I tried to delete my old content with .empty()
function, but it doesn't make a difference.
This is mainly not an Error, but after some reloads, the number of warnings getting really high, and makes the browsing really slow, even if the actual network communication is pretty fast. There is only one requests, when I update the page, so I don't make 512 requests for an image :)
NOTE: When I say "update the page" I mean, I make an AJAX call, receiving some HTML and replacing the current content like this:
$.get('/inner/url', function(response){
$("#content").html(response.data.html); // the response is a JSON with some more data
});
What should I do, to avoid this problem?