I have a page's html stored in a string.
I want to replace the whole html of the displayed page with the html in my string, and then trigger all the page lifecycle events such as document.ready, window.load, etc.
I though about using the filesystem API - writing the html into the file system and then redirecting to it. Not sure if it's workable, though, and it is definitely an overkill.
Is there an easier and cleaner way to get the same result?
Thanks.
what about
$('html').html(new_html_body);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With