HTTPArchive / legacy.httparchive.org

<<THIS REPOSITORY IS DEPRECATED>> The HTTP Archive provides information about website performance such as # of HTTP requests, use of gzip, and amount of JavaScript. This information is recorded over time revealing trends in how the Internet is performing. Built using Open Source software, the code and data are available to everyone allowing researchers large and small to work from a common base.
https://legacy.httparchive.org
Other
328 stars 84 forks source link

Added iframes custom_metric #200

Closed kevinfarrugia closed 3 years ago

kevinfarrugia commented 3 years ago

This is a custom metric that retrieves the data related to <iframe> elements present on the page, including their attributes.

It will be used in the 2021 Resource Hints chapter to retrieve lazy loaded iframes.

Sample WPT https://webpagetest.org/custom_metrics.php?test=210526_BiDcXM_dbe65778982f32e4a5df707fa05d5d74&run=1&cached=0

Data

{
  "iframes": {
    "total": 2,
    "nodes": [
      {
        "tagName": "iframe",
        "loading": "lazy",
        "width": "560",
        "height": "315",
        "src": "https://www.youtube.com/embed/XBfYPp6KF2g",
        "allow": "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
        "allowfullscreen": ""
      },
      {
        "tagName": "iframe",
        "loading": "lazy",
        "width": "560",
        "height": "315",
        "src": "https://www.youtube.com/embed/rrVDATvUitA",
        "allow": "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
        "allowfullscreen": ""
      }
    ],
    "attribute_usage_count": {
      "loading": 2,
      "width": 2,
      "height": 2,
      "src": 2,
      "frameborder": 2,
      "allow": 2,
      "allowfullscreen": 2
    }
  },
  "loading_values": ["lazy", "lazy"]
}
kevinfarrugia commented 3 years ago

Closed. Duplicate of #201