I was actually interested in looking at which MIME types were used for <script src>
requests, but I could not find anything in the data to get exactly that (short of scraping URLs from request bodies and then looking them up in the requests table, maybe?)… But Accept: */*
is used for such requests, but I think also some other requests (stylesheets? fonts? object
elements?)
SELECT mime_type, COUNT(*) AS num, RATIO_TO_REPORT(num) OVER() AS ratio
FROM (
SELECT req_headers, REGEXP_EXTRACT(LOWER(res_headers), r'"name":"content-type","value":"\s*([^";]+)') AS mime_type
FROM (
SELECT
JSON_EXTRACT(payload, '$.request.headers') AS req_headers,
JSON_EXTRACT(payload, '$.response.headers') AS res_headers
FROM [httparchive:har.2016_08_01_chrome_requests]
)
)
WHERE req_headers CONTAINS '"name":"Accept","value":"*/*"'
GROUP BY mime_type
ORDER BY num DESC