4

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.

4
  • Like you want to save the whole page as HTML, CSS and JS? Or as an image? Commented Mar 30, 2017 at 13:38
  • Yes, exactly. There are some download links in the web page which would send to customers. So I prefer to save and forward the original HTML page, instead of image or pdf. Commented Mar 30, 2017 at 13:41
  • stackoverflow.com/questions/4911338/… Commented Mar 30, 2017 at 13:50
  • 1
    See chrome.pageCapture API. Commented Mar 30, 2017 at 19:47

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.