0

Sometimes my HTTP responses have rather large content (maybe about 5 MB) and I want to save those together with the rest of the requests in the HAR file. However, the HAR file sometimes only contains part of the response content and sometimes only headers etc but nothing of the content at all. I tried most recent Chrome, Chromium and Firefox browsers.

To reproduce: Open developer tools, record, open a site that returns a large HTTP response (like a big photo JPEG or something) and save the HAR file. It will be much smaller than the size of the JPEG image.

Where is the setting so I can make the developer tool save the full response with the HAR file?

finefoot
  • 9,914
  • 7
  • 59
  • 102

2 Answers2

0

*** Disclaimer: Answer by HttpWatch Developer ***

Our HttpWatch software (Windows only) that works with Chrome and Edge can help you do this. Its default file format (HWL) contains a complete log of all responses whatever their size. The log files can be opened for visual inspection in HttpWatch Studio or examined programmatically using the HttpWatch API.

It can export to HAR files without any restriction on response body size but currently this is only possible using the ExportHAREx automation method:

https://apihelp.httpwatch.com/HttpWatch_API~HttpWatch.Log~ExportHAREx.html

If you save HAR files directly from the HttpWatch browser extensions response bodies are limited to 50 kB.

You can try HttpWatch for free:

https://www.httpwatch.com/download/

or contact support@neumetrix.com for more information

HttpWatchSupport
  • 2,804
  • 1
  • 17
  • 16
  • So it's not possible to change this setting in the browser? "If you save HAR files directly from the HttpWatch browser extensions response bodies are limited to 50 kB." Where are you getting this information from? I'm pretty sure that I've seen bigger responses in HAR files. Unfortunately your software doesn't help. – finefoot Sep 15 '22 at 17:49
  • I believe there's a hard coded limit in the browser on the size of HAR responses. HttpWatch also presently has a hard coded limit in the GUI tools. Do you need to access the full response bodies programmatically or manually through a GUI tool? – HttpWatchSupport Sep 21 '22 at 10:29
  • I just wanted to be able to save the HAR from inside the browser dev tools. I found a solution, by the way. See my answer below :) Thanks for your help – finefoot Sep 24 '22 at 17:03
0

Here is a partial answer for Firefox, at least.

This is the bug report, which induces the patch: https://bugzilla.mozilla.org/show_bug.cgi?id=1223726 Open about:config and change devtools.netmonitor.responseBodyLimit from default value 1048576 to your desired size in bytes.

finefoot
  • 9,914
  • 7
  • 59
  • 102