How to include all resources in one html file?

Is there a C # library or any free tool that can convert an html file with many reference resources into a single all-in-one html file?

The main task is to have only one file, which means that I need to include

  • External Javascript Files - This Probably Means Replacing All Tags
  • CSS files
  • Maybe I forgot something :)

This HTML file must be readable in all browsers, so I cannot use the MHT file format (unreadable in Safari, iPad ...)

+6
source share
1 answer

You can use HTML Agility Pack to read / write html document. HTML Agility supports XPath, so you can get a list of the nodes you want to modify.

Using this, you need to easily change the value of the image tag attribute. You can also get a list of js external links, read them and then update the script tag accordingly.

+2
source

Source: https://habr.com/ru/post/914540/


All Articles