Skip to content

Simplified access to raw HARs #1011

Closed as not planned
Closed as not planned

Description

@max-ostapenko

We discussed with @nrllh the cost efficient way to get all the website resources in historical crawls.
We don't have a page partitioning on the crawl.requests table, so querying even one month would cost thousands.

@pmeenan confirmed the approach to construct HAR file URLs:

WITH hars AS (
SELECT
  REPLACE(FORMAT_DATE('%b_%e_%Y', date), ' ', '') AS date,
  wptid,
  page,
  IF(client = 'mobile', 'android', 'chrome') AS platform
FROM crawl.pages
WHERE date >= '2016-01-01' AND
  is_root_page AND
  page = 'https://www.google.com/'
)

SELECT
  page,
  CONCAT('https://storage.googleapis.com/httparchive/crawls/', platform, '-', date, '/', wptid, '.har.gz') AS url
FROM hars

This could be the way to retrospectively analyse the metrics not available in the crawls.

In order to remove complexity of downloading and parsing HARs - we could offer BigQuery custom routine, to make them available for analysis directly within a query.

P.S. There is also a related idea for a scalable access of old HARs - to restore retrospective BigQuery data. #942

Activity

  1. changed the title [-]Simplified access to WPT results and HARs[/-] [+]Simplified access to raw WPT results and HARs[/+] on Feb 16, 2025
  2. changed the title [-]Simplified access to raw WPT results and HARs[/-] [+]Simplified access to raw HARs[/+] on Feb 16, 2025
  3. max-ostapenko commented on Jul 14, 2025

    @max-ostapenko
    ContributorAuthor

    We removed all the duplicated historical crawl data from cloud storage in httparchive/crawls.
    HARs are only stored for the last crawl, and all the history is available only in BigQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions