How to access Firefox cache from webdriver?

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

+4
source share
1 answer

The page returned by the URL about:cache-entry?... contains a line similar to this:

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

This is the full path of the file cache, if any. I think you can read this file with Python as usual, but I have not tested it yet. The path name may also be none in the case of small files cached only in memory. You can get the contents of the file by parsing the hex dump on the returned page in this case.

+2
source

All Articles