Reputation: 174
I am working on a Chrome extension
, and an important function of it is: when a new tab created, this extension will "save" the whole web page to the hard disk automatically. Just like the built-in "save as" function of Chrome.
I did not get an answer from google for this topic. Would someone please tell me how to do that. It would be better to offer some examples.
Upvotes: 4
Views: 5049
Reputation: 1413
You can use chrome.pageCapture
API to save the page (along with contents such as image, css, scripts) as MHTML file to disk.
See https://developers.chrome.com/extensions/pageCapture
Upvotes: 3