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 form markup custom metric #237

Closed kevinfarrugia closed 2 years ago

kevinfarrugia commented 2 years ago

Updated the markup custom metric to include form property containing the number of form elements in the page, target and method attributes and elements within each form.

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

...
{
  "form": {
    "target": { "_blank": 2 },
    "method": { "post": 1 },
    "elements": [
      {
        "tagNames": { "fieldset": 1, "legend": 1, "input": 3 },
        "types": { "text": 2, "submit": 1 },
        "total": 5
      },
      {
        "tagNames": { "input": 2, "button": 1 },
        "types": { "submit": 1 },
        "total": 3
      }
    ],
    "total": 2
  }
}
...