Skip to content

Instantly share code, notes, and snippets.

@paulogaspar7
Forked from marcusandre/gen_appcache.md
Created November 12, 2013 18:48
Show Gist options
  • Save paulogaspar7/7436492 to your computer and use it in GitHub Desktop.
Save paulogaspar7/7436492 to your computer and use it in GitHub Desktop.

Generate Appcache Manifest (incl. xhr) in Chrome DevTools

  1. Open your Chrome Developer Tools
  2. Navigate to the Network tab
  3. Just right click into the panel and choose Copy ALL as HAR (maybe the page needs a reload)
  4. Switch to the console tab and save your HAR data in a variable. (var data = cmd + v)
  5. Now let's create the cache manifest:
console.log('CACHE MANIFEST\n\nCACHE:');

data.log.entries.forEach(function(entry) { 
  console.log(entry.request.url) 
});

console.log('\nNETWORK:\n*');

You did it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment