Background
I want to access the cache of Chrome and Firefox in my Cocoa application. I need to get the HTML for pages accessed recently. Safari is a piece of cake - all this information is available in SQLite data stores, but not so in Chrome and Firefox.
The Problem
For Firefox, the cache is in /Library/Caches/Firefox/Profiles/xxx.default/Cache with filenames _CACHE_001_ _CACHE_002_ _CACHE_003_ and _CACHE_MAP_
For Chrome, the cache is in /Library/Caches/Google/Chrome/Default/Cache with filenames data_0 data_1 data_2 and data_3
What I've tried
The only article I can find that sheds any light on what format these caches are in is here. It recommends a Cache Viewer tool, but doesn't explain how one might do this programmatically.
Questions
Is there any way of reconstructing this data using command line tools or the Cocoa framework? Or is it much too low level?
Is there another way of getting at the HTML of recent web pages that I don't know about?