jquery - Parse HTML in javascript without loading all resources -


I know that there are so many questions around it but in my specific case I did not get any answer (which is not the case

I am creating an html mobile app for multi-platform using Cordoba, angular and ionic. My app is receiving web pages from the server that I do not have and I Need to remove some data from pages.

I have found several ways I am not satisfactory for me.

  1. jQuery: I manage to parse the HTML successfully but unfortunately parsing my HTML page starts loading of such resources Images like, which I do not want at all. I just want to remove the string from the html page and of course do not want to load all the images.

  2. Such internal One Vertu with HTML Create a Domain Element

      Var L = document.createElement ('div'); El.innerHTML = MyHtmlPage;  

    Similar problems such as jQuery, Resources like image are also loaded.

  3. Use a DomParser like this

    Var al = new DOMParser (). ParseFromString (string, 'text / html');

This is not supported.

I want someone to help me find a decent solution, I can use regexp otherwise, but I hate them.


Comments