Get html source faster then with RetrieveHTML?

Post Reply
vitaliy_zh
Posts: 5
Joined: Thu Apr 02, 2020 2:28 pm

Get html source faster then with RetrieveHTML?

Post by vitaliy_zh » Tue May 19, 2020 9:02 pm

Hello,
Is there a way to get the HTML of the main frame faster than RetrieveHTML?
Thanks!

User avatar
salvadordf
Posts: 2337
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get html source faster then with RetrieveHTML?

Post by salvadordf » Wed May 20, 2020 8:19 am

You can also use a filter to intercept the HTML contents even before they are rendered.
See the ResponseFilterBrowser demo for the details.

vitaliy_zh
Posts: 5
Joined: Thu Apr 02, 2020 2:28 pm

Re: Get html source faster then with RetrieveHTML?

Post by vitaliy_zh » Wed May 20, 2020 2:19 pm

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!

User avatar
salvadordf
Posts: 2337
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get html source faster then with RetrieveHTML?

Post by salvadordf » Thu May 21, 2020 8:24 am

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.

Post Reply