Question

I'm able to access pages like about:cache-entry?client=HTTP&sb=1&key=(some URL) directly in Firefox, but when it renders the page, it certainly gets the data from some storage. How can I access the latter from Python Firefox Webdriver?

Was it helpful?

Solution

The page returned by such an about:cache-entry?... URL contains a line like this one:

file on disk: /home/fviktor/.mozilla/firefox/7jx6k3hx.default/Cache/CF7379D8d01

It is the full pathname of the cache file if any. I think you'll be able to read that file from Python as usual, but I haven't tested it yet. The pathname can also be none in the case of small files cached only in memory. You can get the file contents by parsing the hex dump on the returned page in this case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top