How to save a webpage to HTML and also save the (css) recources

Hi all!!

Just bought the new update of the desktop version of Xojo! (license renewed)
Really happy!

I am making an app to download a webpage in order to save it as HTML.
I need to download also the recourses (most important the CSS)

My question is therefor: How to download html webpage and recources from website?

I have the following setup:

  Dim socket1 As New HTTPSocket
  Dim data As String = socket1.Get("www.site.com", 30)
  textarea1.text =data

I need also download the resources such as CSS.

Can anyone tell me how to download the external resources? (A code example would be great)

What would be the best approach?

You would need to parse the downloaded HTML file and check for any external resources that need to be loaded.

when you use a Mac for browsing and you have MBS plugins, you can use the web archive functions from WebKit to save webpage as an archive. The archive ist just a zip archive with all required files.

Thank you very much Christian,
Which MBS plugin are you talking about? and which Webkit save function? Many thanks!

maybe you start reading here:
https://www.monkeybreadsoftware.net/class-webarchivembs.shtml