Skip to content

Commit

Permalink
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org…
Browse files Browse the repository at this point in the history
… into production
  • Loading branch information
tunetheweb committed Jan 9, 2023
2 parents fbff24f + a32e18b commit cbabb29
Show file tree
Hide file tree
Showing 33 changed files with 1,785 additions and 171 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/add-to-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
if: github.repository == 'HTTPArchive/almanac.httparchive.org'
steps:
- name: Update release notes
uses: release-drafter/release-drafter@v5.21.1
uses: release-drafter/release-drafter@v5.22.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/code-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v3
- name: Set up Python 3.8
if: ${{ matrix.language == 'python' }}
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: '3.8'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
echo "VALIDATE_ALL_CODEBASE=false" >> $GITHUB_ENV
- name: Lint Code Base
uses: github/super-linter@v4.9.7
uses: github/super-linter@v4.10.0
#uses: docker://github/super-linter:v4.7.1
env:
DEFAULT_BRANCH: main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lintsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: '3.8'
- name: Lint SQL code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/predeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
node-version: '16'
- name: Set up Python 3.8
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: '3.8'
- name: Install Asian Fonts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
node-version: '16'
- name: Set up Python 3.8
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: '3.8'
- name: Run the website
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Use more complete checks for generated HTML linting
run: cp -f .github/linters/.htmlhintrc_morechecks .github/linters/.htmlhintrc
- name: Lint Generated HTML
uses: github/super-linter@v4.9.7
uses: github/super-linter@v4.10.0
env:
DEFAULT_BRANCH: main
FILTER_REGEX_INCLUDE: src/static/html/.*
Expand Down
10 changes: 3 additions & 7 deletions sql/.sqlfluff
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ templater = jinja
# Comma separated list of rules to check, default to all
rules = all
# Comma separated list of rules to exclude, or None
exclude_rules = L011,L014,L016,L020,L022,L026,L027,L028,L029,L030,L031,L032,L034,L035,L036,L037,L042,L043,L051,L060
exclude_rules = L011,L014,L015,L016,L020,L022,L026,L027,L028,L029,L030,L031,L032,L034,L035,L036,L037,L042,L043,L051,L060,L071
# L011 - We don't always alias tables with AS ("FROM table1 AS tb1" instead of "FROM table1 tb1"). Do for columns but not for tables.
# L014 - Unquoted identifiers (e.g. column names) will be mixed case so don't enforce case
# L015 - Sometimes clearer to include brackets for complex COUNT(DISTINCT) cases
# L016 - We allow longer lines as some of our queries are complex. Maybe should limit in future?
# L020 - Asks for unique table aliases meaning it complains if selecting from two 2021_07_01 tables as implicit alias is table name (not fully qualified) so same.
# L022 - CTEs may be chained and do not require a blank line separator, only the last one.
Expand All @@ -32,6 +33,7 @@ exclude_rules = L011,L014,L016,L020,L022,L026,L027,L028,L029,L030,L031,L032,L034
# L043 - Use coalesce instead of case if you can. But it's clearer!?
# L051 - INNER JOIN must be fully qualified. Probably should use this but not our style.
# L060 - Use COALESCE instead of IFNULL or NVL. We think ISNULL is clearer.
# L071 - Turn off until https://github.com/sqlfluff/sqlfluff/issues/4188 is addressed
# The depth to recursively parse to (0 for unlimited)
recurse = 0
# Below controls SQLFluff output, see max_line_length for SQL output
Expand Down Expand Up @@ -143,12 +145,6 @@ unquoted_identifiers_policy = all
[sqlfluff:rules:L003]
hanging_indents = True

# TODO - remove once 1.4.1 fully rolled out as this has been replaced by
# [sqlfluff:layout:type:binary_operator]
# line_position = trailing
[sqlfluff:rules:L007]
operator_new_lines = before

[sqlfluff:rules:L010]
# Keywords
capitalisation_policy = upper
Expand Down
10 changes: 10 additions & 0 deletions src/config/2022.json
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,16 @@
"github": "RoelN",
"website": "http://pixelambacht.nl"
},
"ksakae1216": {
"name": "Sakae Kotaro",
"teams": [
"translators"
],
"avatar_url": "1982567",
"website": "https://ksakae1216.com/",
"github": "ksakae1216",
"twitter": "beltway7"
},
"whitep4nth3r": {
"name": "Salma Alam-Naylor",
"teams": [
Expand Down
110 changes: 60 additions & 50 deletions src/config/last_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,121 +51,121 @@
},
"/static/pdfs/web_almanac_2019_en.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "3e79e2fc73b50c87807e222f81a88b28",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "0a74477e8a81b55d819a645475d09489",
"size": 17
},
"/static/pdfs/web_almanac_2019_en_cover_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "776fabb7f9df58d9936f0fe2c9545fa7"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "c681154c0d5880368ee8384f2653b383"
},
"/static/pdfs/web_almanac_2019_en_print_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "7f925a8c87385dae937ab0fd3aaf0ab2",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "cb5f032f97a903d3ed8ae2c48d6cf8e0",
"size": 16
},
"/static/pdfs/web_almanac_2019_ja.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "48139d879d774270074e4e8185b748e1",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "61e6ad9d709fe20eb3fe2b51ea898284",
"size": 17
},
"/static/pdfs/web_almanac_2019_ja_cover_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "9f850986c68e089a7fbb35b6f46b6435"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "fdc20297b23d1d7c159c8ab0dea7561f"
},
"/static/pdfs/web_almanac_2019_ja_print_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "fd4e3ea51f4b3af6036bda83246fb78d",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "f48ca0685f34db509a2ab2abb19bebec",
"size": 17
},
"/static/pdfs/web_almanac_2020_en.pdf": {
"date_published": "2020-12-08T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "08d837f48b038308b5998a6bfc9cf221",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "23e69a08e0d5220253c65e2e784cea5a",
"size": 24
},
"/static/pdfs/web_almanac_2020_en_cover_A5.pdf": {
"date_published": "2020-12-09T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "7ffe037d57fa7430cf16316e4895fd76"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "c3bf676b40bfb510e0c75aea132ee3d2"
},
"/static/pdfs/web_almanac_2020_en_print_A5.pdf": {
"date_published": "2020-12-09T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "528c882876087effa580eec993c28391",
"size": 23
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "f232bbe8da467f4f3e8b43305d7796b4",
"size": 24
},
"/static/pdfs/web_almanac_2020_ja.pdf": {
"date_published": "2021-10-24T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "65272d82d805dad958d3c8d575baa60c",
"size": 24
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "e3c3606cc4fbe021d29bd27502300b5d",
"size": 25
},
"/static/pdfs/web_almanac_2020_ja_cover_A5.pdf": {
"date_published": "2021-10-24T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "0bf08f8e5e46c22e466995de675eadae"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "0efdaf2507957a00028c5d174dd62276"
},
"/static/pdfs/web_almanac_2020_ja_print_A5.pdf": {
"date_published": "2021-10-24T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "6609d50a675b4f0e768068c80382fc39",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "dbb15973d741bd3846095e29afb0e55c",
"size": 24
},
"/static/pdfs/web_almanac_2021_en.pdf": {
"date_published": "2021-12-01T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "67a9351b18ecbadb93e4c612a8aeea8f",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "4dadaa8dfa01808e75ca272f213831db",
"size": 32
},
"/static/pdfs/web_almanac_2021_en_cover_A5.pdf": {
"date_published": "2021-12-01T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "5117866a9e4b604f1f21a617cdb9918a"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "76e2f18cb0f00aeed667c1cdbd8ba7fc"
},
"/static/pdfs/web_almanac_2021_en_print_A5.pdf": {
"date_published": "2021-12-01T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "d0555b0b26a562e74b2daba097b32f23",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "bf9175f5893d5fb5fb21c1c42ef2d6f2",
"size": 31
},
"/static/pdfs/web_almanac_2021_ja.pdf": {
"date_published": "22-08-01T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "d51bed2195e376103f8febb5c279ede8",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "19597f03e59e3bc90b69888ee1dbe36b",
"size": 32
},
"/static/pdfs/web_almanac_2021_ja_cover_A5.pdf": {
"date_published": "22-08-01T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "766f9f432b96b67e6027298104898ef6"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "dede3f9c7bfa836b155f49d6f7fb2045"
},
"/static/pdfs/web_almanac_2021_ja_print_A5.pdf": {
"date_published": "22-08-01T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "13286c00f9d63c659400dd142f51710f",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "950c207f744661a777f3392206b67c4d",
"size": 32
},
"/static/pdfs/web_almanac_2022_en.pdf": {
"date_published": "2022-10-19T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "8c80024397eba6ee3a08ee9a3990a557",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "b0de6207db20f34b2ee7f45c6b4c5c1a",
"size": 32
},
"/static/pdfs/web_almanac_2022_en_cover_A5.pdf": {
"date_published": "2022-10-19T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "ea34fedbd86af9b7130785d98bde80ec"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "830aa7f71cc8dfe4d7f2e6c429b73e6b"
},
"/static/pdfs/web_almanac_2022_en_print_A5.pdf": {
"date_published": "2022-10-19T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "ece8a054d4879b2de8d4f5731299713c",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "eda27dd6c81c6a4048db3021437db177",
"size": 32
},
"en/2019/chapters/accessibility.html": {
Expand Down Expand Up @@ -635,8 +635,8 @@
},
"en/2022/chapters/javascript.html": {
"date_published": "2022-09-26T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "f77832f3e2c2cddef7558d8828f1e2c6"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "8e3040a70a298f2d6ec138da8b835b1a"
},
"en/2022/chapters/markup.html": {
"date_published": "2022-09-26T00:00:00.000Z",
Expand All @@ -660,8 +660,8 @@
},
"en/2022/chapters/performance.html": {
"date_published": "2022-10-25T00:00:00.000Z",
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "268be1d6e423c9204931124dc615a64a"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "de9900154cdb0b20fe312e09f1c2fa10"
},
"en/2022/chapters/privacy.html": {
"date_published": "2022-10-13T00:00:00.000Z",
Expand Down Expand Up @@ -690,8 +690,8 @@
},
"en/2022/chapters/sustainability.html": {
"date_published": "2022-09-26T00:00:00.000Z",
"date_modified": "2022-11-23T00:00:00.000Z",
"hash": "fbe8e2746da79c657ba6b514158828f4"
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "70d490762be1a1b4f3096fcbc5ddb44a"
},
"en/2022/chapters/third-parties.html": {
"date_published": "2022-09-26T00:00:00.000Z",
Expand Down Expand Up @@ -1598,6 +1598,16 @@
"date_modified": "2022-12-12T00:00:00.000Z",
"hash": "8e9fee4dca56d0cff8d1ff4258bae1d7"
},
"ja/2022/chapters/javascript.html": {
"date_published": "2023-01-09T00:00:00.000Z",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "538bd8d30af3d18e965e21cd0c9ba443"
},
"ja/2022/chapters/markup.html": {
"date_published": "2023-01-09T00:00:00.000Z",
"date_modified": "2023-01-09T00:00:00.000Z",
"hash": "ca1508a9d6926c7390286533bfad3855"
},
"ja/2022/contributors.html": {
"date_published": "2022-07-02T00:00:00.000Z",
"date_modified": "2022-07-02T00:00:00.000Z",
Expand Down
10 changes: 5 additions & 5 deletions src/content/en/2022/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ The `type="module"` and `nomodule` attributes are specific to the presence (or a

It's encouraging that 76% of mobile pages load scripts with `async`, as that suggests developers are cognizant of the effects of render blocking. However, such a low usage of `defer` suggests that there are opportunities being left on the table to improve rendering performance.

As noted [last year](../2021/javascript/#async-and-defer), using both `async` and `defer` is an antipattern that should be avoided as the `defer` part is ignored and `async` takes precedence.
As noted [last year](../2021/javascript#async-and-defer), using both `async` and `defer` is an antipattern that should be avoided as the `defer` part is ignored and `async` takes precedence.

The general absence of `type="module"` and `nomodule` is not surprising, as few pages seem to be shipping JavaScript modules. As time goes on, the usage of `type="module"` in particular may increase, as developers ship untransformed JavaScript modules to the browser.

Expand Down Expand Up @@ -334,7 +334,7 @@ Unfortunately, we see five `preload` hints for JavaScript resources at the 90th
{{ figure_markup(
image="modulepreload.png",
caption="Distribution of `modulepreload` adoption for JavaScript resources per page.",
description="Bar chart showing the 10, 25, 50, 75, and 90th percentiles of modulepreload hints for JavaScript resources per page. The values for mobile pages are 1, 1, 2, 6, and 14, respectively. Desktop values are nearly identical to mobile..",
description="Bar chart showing the 10, 25, 50, 75, and 90th percentiles of modulepreload hints for JavaScript resources per page. The values for mobile pages are 1, 1, 2, 6, and 14, respectively. Desktop values are nearly identical to mobile.",
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vTok8UGqYaA58uKaASB2pfM2jlmQu6g3kwHxB6Lb8L7dbccyDtQht823YhchdXRG8SZpB3asRayJI97/pubchart?oid=100852946&format=interactive",
sheets_gid="397179470",
sql_file="resource-hints-preload-prefetch-modulepreload-distribution.sql"
Expand Down Expand Up @@ -648,7 +648,7 @@ The first of these is <a hreflang="en" href="https://web.dev/fid/">First Input D
{{ figure_markup(
image="fid.png",
caption="The distribution of websites' 75th percentile FID values.",
description="Bar chart showing the 10, 25, 50, 75 and 90th percentiles of origin's 75th percentile FID values. All values are 0 ms until the 90th percentile, where both desktop and phone are 25 ms.'",
description="Bar chart showing the 10, 25, 50, 75 and 90th percentiles of origin's 75th percentile FID values. All values are 0 ms until the 90th percentile, where both desktop and phone are 25 ms.",
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vTok8UGqYaA58uKaASB2pfM2jlmQu6g3kwHxB6Lb8L7dbccyDtQht823YhchdXRG8SZpB3asRayJI97/pubchart?oid=217835320&format=interactive",
sheets_gid="2108420759",
sql_file="fid.sql"
Expand Down Expand Up @@ -777,7 +777,7 @@ Avoid using synchronous XHR, and XHR in general. `fetch` is a much more ergonomi

Before the introduction of DOM insertion methods ([`appendChild`](https://developer.mozilla.org/docs/Web/API/Node/appendChild) and others, for example), <a hreflang="en" href="https://developer.mozilla.org/docs/Web/API/Document/write">`document.write`</a> was used to insert content at the position the `document.write` was made in the document.

`document.write` is very problematic. For one, it blocks the HTML parser, and is problematic for a number of other reasons <a hreflang="en" href="https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document.write(">the HTML spec itself warns against its use</a>). On slow connections, blocking document parsing to append nodes in this way creates performance problems that are entirely avoidable.
`document.write` is very problematic. For one, it blocks the HTML parser, and is problematic for a number of other reasons <a hreflang="en" href="https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document.write()">the HTML spec itself warns against its use</a>. On slow connections, blocking document parsing to append nodes in this way creates performance problems that are entirely avoidable.

{{ figure_markup(
caption="The number of mobile pages using `document.write`.",
Expand Down Expand Up @@ -838,7 +838,7 @@ To understand the usage of libraries and frameworks, HTTP Archive uses [Wappalyz
)
}}

It's still no surprise that jQuery is by far the most used library on the web today. Part of that is because WordPress is used on [35%](./cms##most-popular-cmss) of sites, but even so, the majority of jQuery usage occurs outside of the WordPress platform.
It's still no surprise that jQuery is by far the most used library on the web today. Part of that is because WordPress is used on [35%](./cms#most-popular-cmss) of sites, but even so, the majority of jQuery usage occurs outside of the WordPress platform.

While jQuery is relatively small and reasonably quick at what it does, it still represents a certain amount of overhead in applications. Most of what jQuery offers is now <a hreflang="en" href="https://youmightnotneedjquery.com/">doable with native DOM APIs</a>, and may be unnecessary in today's web applications.

Expand Down
4 changes: 2 additions & 2 deletions src/content/en/2022/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ featured_quote: These results show that sites absolutely do have responsiveness
featured_stat_1: 39%
featured_stat_label_1: LCP images that are not statically discoverable
featured_stat_2: 22%
featured_stat_label_2: Pages that are ineligible for bfache due to `no-store`
featured_stat_label_2: Pages that are ineligible for bfcache due to `no-store`
featured_stat_3: 20%
featured_stat_label_3: Top 1k websites that would have good CWV with INP
---
Expand Down Expand Up @@ -309,7 +309,7 @@ Another benefit to using native lazy-loading is that browsers like Chrome are <a

{{ figure_markup(
content="18%",
caption="The percent of mobile pages having image-based LCP that use native or custom lazy-loading it.",
caption="The percent of mobile pages having image-based LCP that use native or custom lazy-loading on it.",
classes="big-number",
sheets_gid="1585533536",
sql_file="lcp_lazy.sql"
Expand Down
Loading

0 comments on commit cbabb29

Please sign in to comment.