Google-chrome – Log HTTP and HTTPS browser traffic, decrypting the latter

firefox-extensionsgoogle-chrome-extensionshttps

Is there a way that I can save all HTTP and HTTPS browser communications (including request, response, full headers and body) to files on my computer?

The HTTPS communications must be saved decrypted.

Ideally I'd be looking for something like an extension for Firefox or Google Chrome.

It must work on Linux.

Best Answer

HAR is HTTP Archive, and is exactly what you want to save (it includes HTTPS unencrypted).

Luckily this is now a basic feature of all major browser (it was not when you asked the question). No more need of third party extensions.

In Firefox (v41+):

  • Start Firefox Developer Tools in Network mode (Top right menu > Developer > Network, or ctrl-shift-Q)
  • Reproduce the target scenario
  • Save the capture by right-clicking on the grid and choosing "Save all as HAR"
  • Export the capture to a HAR file

Other browser:

In recent version of all browser, you can save HAR easily:

https://toolbox.googleapps.com/apps/har_analyzer/