Get a HAR log for the page loaded in the current tab.

This is an asynchronous function that returns a Promise.


var getting =



Return value

A Promise that will be fulfilled with a object containing the HAR log for the current tab. For details of what the log object contains, refer to the HAR specification.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic support Yes No601 No Yes

1. The returned HAR log will be empty unless the user has previously activated the browser's network panel at least once.


Log the URLs of requests contained in the HAR log:

async function logRequests() {
  let harLog = await;
  console.log(`HAR version: ${harLog.version}`);
  for (let entry of harLog.entries) {

logRequestsButton.addEventListener("click", logRequests);


This API is based on Chromium's chrome.tabs API. This documentation is derived from tabs.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,