Usage of HTML Imports

HTML Imports were Blink’s first pass at a component model for the web before ES6 modules were defined. They were only ever supported by blink-based browsers and have since been deprecated and are in the process of being removed.

Part of the removal process is to make sure sites that currently rely on imports user feature detection to see if support exists and to make sure they fall back to a polyfill when support for imports is not present.

#standardSQL
SELECT
  COUNT(JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.HTMLImports')) AS feature
FROM
  `httparchive.pages.2018_04_15_desktop`
HAVING
  feature IS NOT NULL

There are 276 pages in the most recent crawl that used HTML Imports.

#standardSQL
SELECT
  url
FROM
  `httparchive.pages.2018_04_15_desktop`
WHERE
  JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.HTMLImports') IS NOT NULL

This gives us the list of URLs using imports so they can be checked to make sure they degrade gracefully when removed.

2 Likes