I hope you are doing well in these hard times.
Now, I am trying to build a web extension for Firefox that can download a web page with a singe click. The requirement that I am struggling with is that is has to download all images from that page along with the page HTML document but without fetching them again from the server.
So the question is: is this even possible? I know the images are loaded in browser cache, so from my research, I could go about this in a few ways:
- Pull images from cache: Not sure if it possible to access cache from other pages and how?
- Get image data from image and draw them on blank canvas
- Intercept request to images and get the loaded data
Now, after all of this, I have to bulk download all images which complicates the problem further...
Any help on this?
UPDATE: So I decided to switch to Chrome and try the pageCapture API (thanks @wOxxOm for pointing out). Here I ran into a different kind of problem which I wrote in the follow-up question.
Thanks again for your help.