Load image from Firefox cache?

I am trying to load an image from Firefox cache, as the name suggests. I am running Ubuntu, so my cache location is / home / me / .mozilla / firefox / xxxxxx.default / Cache

However, in the cache (and this is also on the Mac), the filenames are just ridiculous combinations of letters and numbers. Is there a way to identify a specific file?

+1


source to share


3 answers


You should take a look at the source code for the CacheViewer add-in .
Download the file, not install it (right click and save as) and then extract it (it's just a Zip file, even if it has a .xpi extension) and then extract the cacheviewer.jar file inside the resulting chrome folder. Finally, go to content and then cacheviewer to find your javascript and XUL files.



From my brief research, useful routines are in the cacheviewer.js file, although if you were hoping there would be a simple javascript one-liner to access cached elements, you're likely to be disappointed. XUL files (which are just XML) are useful when developing JS functions to perform specific tasks. I'm not too sure how this all displays in Greasemonkey and not in the extension environment, but hopefully there is enough code in there to get you started.

+2


source


Ummm, this is really an internal implementation detail. But I suggest looking at how about: cache? Device = disk and about: cache-entry? Client = HTTP & sb = 1 & key = https://stackoverflow.com/Content/img/wmd/blockquote.png .

Also, http://www.securityfocus.com/infocus/1832 gives details. Please note that Firefox does not use a separate file for everything ...



And of course Firefox can change the format at any time.

+1


source


Just assign the img src=

full URL to the attribute . If the image is cached (the server sends the appropriate header Expires:

or Cache-control:

, for example) and it's already in the cache, Firefox won't hit the network.

HTTP caching should be invisible. When you create content, you generally don't have to worry about this.

You can point REDbot to the URL to see all sorts of tasty caching details about it.

+1


source







All Articles