View google chrome's cached pictures

Google Chrome

Google Chrome Problem Overview


How can I view the pictures that Google Chrome cached on websites?

Google Chrome Solutions


Solution 1 - Google Chrome

%UserProfile%\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache

paste this in your address bar and enter, you will get all the files

just rename the files extension into the extension which u r looking.

ie. open command prompt then

C:\>cd %UserProfile%\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache

then

C:\Users\User\AppData\Local\Google\Chrome\User Data\Default\Cache>ren *.* *.jpg

Solution 2 - Google Chrome

This page contains all the cached urls

chrome://cache

Unfortunately to actually see the file you have to select everything on the page and paste it in this tool: http://www.sensefulsolutions.com/2012/01/viewing-chrome-cache-easy-way.html

Solution 3 - Google Chrome

Modified version from @dovidev as his version loads the image externally instead of reading the local cache.

  1. Navigate to chrome://cache/
  2. In the chrome top menu go to "View > Developer > Javascript Console"
  3. In the console that opens paste the below and press enter

var cached_anchors = $$('a');
document.body.innerHTML = '';
for (var i in cached_anchors) {
    var ca = cached_anchors[i];
    if(ca.href.search('.png') > -1 || ca.href.search('.gif') > -1 || ca.href.search('.jpg') > -1) {
        var xhr = new XMLHttpRequest();
        xhr.open("GET", ca.href);
        xhr.responseType = "document";
        xhr.onload = response;
        xhr.send();
    }
}

function response(e) {
  var hexdata = this.response.getElementsByTagName("pre")[2].innerHTML.split(/\r?\n/).slice(0,-1).map(e => e.split(/[\s:]+\s/)[1]).map(e => e.replace(/\s/g,'')).join('');
  var byteArray = new Uint8Array(hexdata.length/2);
  for (var x = 0; x < byteArray.length; x++){
      byteArray[x] = parseInt(hexdata.substr(x*2,2), 16);
  }
  var blob = new Blob([byteArray], {type: "application/octet-stream"});
  var image = new Image();
  image.src = URL.createObjectURL(blob);
  document.body.appendChild(image);
}

Solution 4 - Google Chrome

This tool appears to serve your purposes: http://www.nirsoft.net/utils/chrome_cache_view.html

Solution 5 - Google Chrome

You can make a bookmark with this as the url:

javascript:
var cached_anchors = $$('a');
for (var i in cached_anchors) {
    var ca = cached_anchors[i];
    if(ca.href.search('sprite') < 0 && ca.href.search('.png') > -1 || ca.href.search('.gif') > -1 || ca.href.search('.jpg') > -1) {
        var a = document.createElement('a');
        a.href = ca.innerHTML;
        a.target = '_blank';
        
        var img = document.createElement('img');
        img.src = ca.innerHTML;
        img.style.maxHeight = '100px';
        
        a.appendChild(img);
        document.getElementsByTagName('body')[0].appendChild(a);
    }
}
document.getElementsByTagName('body')[0].removeChild(document.getElementsByTagName('table')[0]);
void(0);

Then just go to chrome://cache and then click your bookmark and it'll show you all the images.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionWeb_DesignerView Question on Stackoverflow
Solution 1 - Google ChromeAbhiView Answer on Stackoverflow
Solution 2 - Google ChromeEric LeroyView Answer on Stackoverflow
Solution 3 - Google ChromeMikeView Answer on Stackoverflow
Solution 4 - Google ChromeScott MoonenView Answer on Stackoverflow
Solution 5 - Google ChromedovidevView Answer on Stackoverflow