views:

333

answers:

1

Hello, 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?

A: 

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.

fviktor
If you look in your `about:cache` you'll see that some cache items are on disk (*Disk cache device*) and some are in memory (*Memory cache device*) those in memory don't have a path associated with them and the OP wants to know how he can access them.
Motti
fviktor