If I am on a web page, we can get entire html source code by
document.querySelector('html')
I can also download the necessary styles by iterating over styleSheets Object like
for (var sheet= 0; sheet<document.styleSheets.length; sheet++) {
But the issue I am facing is they have recursively nested links in them , like
url("../fonts/fa-regular.woff2") format("woff2")
How can I access them and download them locally so that I can serve from my local using JavaScript?
I want to download all the css and js dependencies and serve from my server/local Can it be done? Please guide
I think the best (and right) solution would be to use Node.js
Best regards!