Page 1 of 1

Get html source faster then with RetrieveHTML?

Posted: Tue May 19, 2020 9:02 pm
by vitaliy_zh
Hello,
Is there a way to get the HTML of the main frame faster than RetrieveHTML?
Thanks!

Re: Get html source faster then with RetrieveHTML?

Posted: Wed May 20, 2020 8:19 am
by salvadordf
You can also use a filter to intercept the HTML contents even before they are rendered.
See the ResponseFilterBrowser demo for the details.

Re: Get html source faster then with RetrieveHTML?

Posted: Wed May 20, 2020 2:19 pm
by vitaliy_zh
Hi salvadordf,

thank You for this example! I've looked closely at the project, but unfortunately I couldn't find the right place in the code that could help me.

Could You maybe be so kind and point me to the right place in the code or post a small example here?

My job is the following: I load a page and have to get the HTML of the Mainframe ASAP. Other frames and resources are not care. From my point of view the loading can even be canceled as soon as I have the HTML of the mainframe.

Many thanks in advance!

Re: Get html source faster then with RetrieveHTML?

Posted: Thu May 21, 2020 8:24 am
by salvadordf
If you don't want to render the page and you can ignore the rest of the resources then all you need is to use the code in the URLRequest demo to create a GET request.

...or even easier, use a THTTPClient or Indy to download the HTML.