fetag
fetag

Reputation: 174

how to save a page with chrome extension

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

Answers (1)

Chang
Chang

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

Related Questions