There are several ways to do this:
This is basically a compromise between speed and realism. Personally, I would go with No. 2 if the site had complex JavaScript or invalid HTML, but both approaches deserve attention.
In the future I will follow up on this project , which looks like a terrific idea.
jarib source share