I have ajax-call which request html from local proxy php file. This proxy downloads html from external server and returns, where html is parsing via jQuery.
$.ajax({
type: 'POST',
url: 'proxy.php',
data: {
goal: 'get',
url: url
},
success: function(page) {
let p = $(page),
h1 = p.find('h1');
//some code
//<-- problem begins
},
error: function(response) {
console.error(response);
}
});
After doing some code it throws in browser console a lot of 404-errors, while trying download some external images, what leads to high processor load. Actually i don't need those images at all, i just need plain html.
I've tried these methods to free some memory but it was useless:
p.remove();
p = undefined;
How to prevent loading images or maybe remove variable after using it?