How did I read the Chrome and Firefox cache programmatically on a Mac?

Background

I want to access the Chrome and Firefox cache in my Cocoa application. I need to get HTML pages to access pages recently. Safari - a piece of cake - all this information is available in SQLite data warehouses, but not in Chrome and Firefox.

Problem

For Firefox, the cache is in /Library/Cache/Firefox/Profiles/xxx.default/Cache with the file names _CACHE_001_ _CACHE_002_ _CACHE_003_ and _CACHE_MAP_

For Chrome, the cache is in / Library / Caches / Google / Chrome / Default / Cache with the file names data_0 data_1 data_2 and data_3

What i tried

The only article I can find sheds light on what format these caches are in here . He recommends the Cache Viewer tool, but does not explain how this can be done programmatically.

Questions

  • Is there any way to recover this data using command line tools or Cocoa framework? Or is it too low?

  • Is there any other way to get the HTML of the latest web pages that I don't know about?

+6
firefox google-chrome caching cocoa macos
source share
1 answer

The only solution that I see is what Ole suggested above, namely to look at the code from Chrome and Firefox and find out how they encode the cache.

Since then, I realized that this is a huge coding problem, fraught with difficulties. I refuse this function and try a simpler way.

+1
source share

All Articles