Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to run a HAR archive on google chrome?

Is it possible to a run a HAR file that was generated by chrome? I have exported a ajax request from chrome and changed a parameter and I want to run it again. I'm trying to debug using a problem on my site and this ajax request must be executed on the page context.

If it isn't possible, do you have other alternative for this?

like image 441
Luiz Guilherme Avatar asked Jan 10 '12 16:01

Luiz Guilherme


People also ask

What is a HAR file in Chrome?

Summary. HAR (HTTP Archive) is a file format used by several HTTP session tools to export the captured data. This can be highly useful in troubleshooting complex issues by obtaining additional information about the network requests that are generated in the browser while an issue occurs.

How do you open HAR logs?

Show activity on this post. Open chrome browser. right click anywhere on a page > inspect elements > go to network tab > drag and drop the . har file You should see the logs.


1 Answers

No, unfortunately Chrome cannot replay a session from a HAR file. To do that, you'll need to rely on a proxy which can feed the data to Chrome. To do so, you have a few options:

  1. https://github.com/chromium/web-page-replay

    Open source proxy solution which will record the session and then replay it to your browser. Even though the tool is not specifically designed to edit the data, you can adjust the resources to be served and let it feed the data back to the browser. Definitely more on the involved side, but the added benefit of this solution is that it will work with any browser (since it's just a proxy).

  2. Depending on your platform you can use Fiddler2 (Win), or something like Charles proxy (Mac). Both are proxies, but come with a nice GUI which will also allow you to intercept and modify the response on the fly (as well as export any session in HAR format).

like image 178
igrigorik Avatar answered Nov 15 '22 18:11

igrigorik