How to generate HAR file in Chrome|Firefox|IE or edge


This blog post talks about what is HAR file, used for, How to generate har file in chrome, firefox and safari, tools to view harfile.

What is HAR file?

The har file is an acronym for the http archive file, which is used to store the http session information for all of a webpage’s Http requests. This file’s content is in json format. And file extension is HAR This file contains network call information for a single web page or multiple web pages.

What type of data it contains?

  • All the network calls are recorded with status
  • All cookies and session information
  • All the client information that user submitted
  • And all logs about web browser page information

what can be used this data for?

  • Performance inspection from browser side like page slow, any thrid party calls are taking time and their status
  • It helps to debug the issues from client side
  • Performance analysis

Following are steps explains to download HAR file for trouble shooting web request for offline.

How to generate the har file in Chrome?

  • First, Open chrome browser
  • Next, open the developer tools either with shortcut Ctrl + Shift + I or menu -> more tools -> developer tools.
  • Select Network tab in developer tools
  • Open the webpage url that you want to track information.
  • Check preserve log option to capture page interaction information on a single har file
  • There are up and down arrow icons, up icon for import HAR files, Down icon for export HAR file.
  • Click on down arrow coloured in read as you seen below screenshot capture har file in chrome

generate har file in Firefox browser

  • Open Firefox browser
  • Open developer tools using either shortcut Ctrl+Shift+E or Tools menu -> Web Developer -> Networks
  • Open webpage to track information
  • Open an icon right side as shown in the below screenshot Select Save All As HAR option to generate HAR file
  • page navigation information also can be captured using persist Logs option
Generate Har file in Firefox browser

generate har file in Internet Explorer or edge browser

  • Open IE or Edge browser
  • Open Developer tools with F12 shortcut or menu -> more tools -> developer tools
  • Go to Network tabs
  • Open the webpage that wants to track data
  • Click save icon or Ctrl + S option to Export HAR
  • You can check save icon placement in the below screenshot Generate Har file in Internet Explorer or Edge browser

har file analyser tools

Once you have HAR file downloaded with above steps, you can use google toolto analyse the content or data You can check below to analyse the imported file to

Conclusion

Discussed about what is HAR file used for and also how to generate this file in different browsers.

Hope you like this article.

THE BEST NEWSLETTER ANYWHERE
Join 6,000 subscribers and get a daily digest of full stack tutorials delivered to your inbox directly.No spam ever. Unsubscribe any time.

Similar Posts
Subscribe
You'll get a notification every time a post gets published here.