views:

25

answers:

2

Hi there!

I load a bunch of HTML from the server containing img-tags. I need to parse this response (I need only a small part of it) and find a few particular tags.

Problem is, as soon as I throw the response into jQuery to parse it, the browser loads all contained images. This is partly unnecessary (I don't need most of them), but the biggest problem is that they are loaded via HTTP in an SSL-environment.

Is there a way to parse an HTML-string without loading the contained images?

Thank you very much in advance! Hendrik

+2  A: 

You should be able to parse the response inside the return function.

$.get(url, data, function(html)
{
    // Parse here
});
Josh K
A: 

Wouldn't encoding the response (e.g. JSON) prevent the browser from interpreting it?

joho