I want to get images from safari which i show in my app. I have to differentiate all cache images domain wise, so before new update of mac os x12.4 and safari v10.1. i was getting images from below location
~/Library/Caches/com.apple.Safari/WebKitCache/Version
for example I was getting images of google.com from the location -:
~/Library/Caches/com.apple.Safari/WebKitCache/Version 9/Records/google.com
in this location OS was saving images by domain name's folder. But after update they have changed domain into a different string which is like this
~/Library/Caches/com.apple.Safari/WebKitCache/Version 9/Records/1A71C22C3069617815FB52ACDEB96918BD33D7DD
in this situation i cant specify images by domain name.
I tried every possibility for solving this problem so could anyone let me know if I can retrieve browsers cache images domain wise or Can I validate which image is cached by which domain.
What I was getting earlier - :
What I get later after update - :
Thanks in advance folks.
It seems that safari has been changed the format of naming convention for safari cache files. FYI we were on the same thing and we were finding a workaround for this; Then we came to the conclusion like below - :
Safari maintains its history database on the below location - : ~/Library/Safari/History.db
Read this db. This database has a table named "history_visits" which holds the timestamp of triggered urls and its unique id
with this unique id you will find the triggered url in another table named "history_items"
find the cache images which matches the same timestamp according to the database.
if it matches then it may be the right image which you were looking.
Another important thing is -: This is not the full proof solution of this problem to get the exact images according to the safari history, It just the solution which we came up with.