Skip to content

Commit 352edd4

Browse files
committed
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org into production
2 parents c86fe76 + 7e2aa66 commit 352edd4

File tree

9 files changed

+57
-104
lines changed

9 files changed

+57
-104
lines changed

.github/workflows/progress-tracker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ env:
44
# Update these environment variables every year
55
# And check the tracker is enabled at:
66
# https://github.com/HTTPArchive/almanac.httparchive.org/actions/workflows/progress-tracker.yml
7-
FILTER_LABEL: '2024 chapter'
8-
TRACKER_ISSUE_NUMBER: 3634
9-
SQL_BASE_DIR: 'https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/sql/2024/'
7+
FILTER_LABEL: '2025 chapter'
8+
TRACKER_ISSUE_NUMBER: 4110
9+
SQL_BASE_DIR: 'https://github.com/HTTPArchive/almanac.httparchive.org/tree/main/sql/2025/'
1010

1111
on:
1212
workflow_dispatch:

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# 📕 Web Almanac
22

3-
[![Production Checks GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Production%20Checks/badge.svg)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Production+Checks%22) [![Test Website GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Test%20Website/badge.svg?branch=main)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Test+Website%22) [![TLS Observatory](https://img.shields.io/mozilla-observatory/grade-score/almanac.httparchive.org?publish)](https://observatory.mozilla.org/analyze/almanac.httparchive.org)
3+
[![Production Checks GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Production%20Checks/badge.svg)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Production+Checks%22) [![Test Website GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Test%20Website/badge.svg?branch%3Amain)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Test+Website%22+branch%3Amain) [![TLS Observatory](https://img.shields.io/mozilla-observatory/grade-score/almanac.httparchive.org?publish)](https://observatory.mozilla.org/analyze/almanac.httparchive.org)
44

5-
[![2024 Content Planning](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/27)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/27) [![2024 Analysis Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/24)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/24) [![2024 Content Writing Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/25)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/25) [![2024 Launch!](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/26)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/26) [![Content Translation Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/19)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/19)
6-
7-
[![Open Dev Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/development)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Adevelopment) [![Open Analysis Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/analysis)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Aanalysis) [![Open Translation Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/translation)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Atranslation) [![Open Writing Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/writing)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Awriting)
5+
[![Open Writing Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/writing)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Awriting) [![Open Dev Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/development)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Adevelopment) [![Open Analysis Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/analysis)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Aanalysis) [![Open Translation Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/translation)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Atranslation)
86

97
The Web Almanac is HTTP Archive's annual **state of the web** report.
108

@@ -32,12 +30,11 @@ See [our contributing guide](CONTRIBUTING.md). To run the Web Almanac locally pl
3230

3331
## Next Web Almanac timeline
3432

35-
<!--
36-
We are currently working on the 2024 version. If you would like to get involved, here's a [list of chapters](https://github.com/HTTPArchive/almanac.httparchive.org/issues?q=is%3Aissue+is%3Aopen+label%3A%222024+chapter%22) looking for help.
37-
-->
38-
We've just finished the 2024 edition and are starting to think about organizing the 2025 edition. If you'd be interested to contribute, you can sign up to be notified when the project planning kicks off by filling out [this interest form](https://forms.gle/Juz3Ak7RkV6oSBKNA). Check off all teams that interest you and give a detailed description of what your areas of expertise are so we can reach out to you with targeted opportunities.
33+
We are currently working on the 2025 version. If you would like to get involved, here's a [list of chapters](https://github.com/HTTPArchive/almanac.httparchive.org/issues?q=is%3Aissue%20is%3Aopen%20label%3A%222025%20chapter%22) looking for help. Alternatively, you can fill out [this interest form](https://forms.gle/Juz3Ak7RkV6oSBKNA) to express your interest. Check off all teams that interest you and give a detailed description of what your areas of expertise are so we can reach out to you with targeted opportunities.
3934

35+
<!--
4036
In the meantime, enjoy the [2024 edition](https://almanac.httparchive.org) and we're still open to contributions in the form of [translations](https://github.com/HTTPArchive/almanac.httparchive.org/issues?q=is%3Aissue+is%3Aopen+label%3Atranslation), [development](https://github.com/HTTPArchive/almanac.httparchive.org/issues?q=is%3Aissue+is%3Aopen+label%3Adevelopment) or bug fixes.
37+
-->
4138

4239
## Where to find us
4340

src/config/contributors.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4081,6 +4081,9 @@
40814081
],
40824082
"2022": [
40834083
"translators"
4084+
],
4085+
"2024": [
4086+
"translators"
40844087
]
40854088
},
40864089
"twitter": "beltway7",

src/config/last_updated.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
},
3737
"/static/js/send-web-vitals.js": {
3838
"date_published": "2021-02-24T00:00:00.000Z",
39-
"date_modified": "2025-03-03T00:00:00.000Z",
40-
"hash": "626d029c7107a8fe569a02a06b2f5894"
39+
"date_modified": "2025-05-15T00:00:00.000Z",
40+
"hash": "67574c23a511f3149c90c88735c5a6f3"
4141
},
4242
"/static/js/web-vitals.js": {
4343
"date_published": "2020-11-13T00:00:00.000Z",
44-
"date_modified": "2024-11-11T00:00:00.000Z",
45-
"hash": "f6f30f40e7d014a2d38f1362c5eb6244"
44+
"date_modified": "2025-05-15T00:00:00.000Z",
45+
"hash": "224e4d80704c73222c7ea0cf1ea453e9"
4646
},
4747
"/static/js/webmentions.js": {
4848
"date_published": "2021-12-01T00:00:00.000Z",

src/package-lock.json

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
"node-fetch": "3.3.2",
4242
"node-watch": "0.7.4",
4343
"prettier": "3.5.3",
44-
"puppeteer": "24.8.1",
44+
"puppeteer": "24.8.2",
4545
"rainbow-code": "2.1.7",
4646
"recursive-readdir": "2.2.3",
4747
"run-script-os": "1.1.6",
4848
"showdown": "2.1.0",
4949
"smartypants": "0.2.2",
50-
"web-vitals": "4.2.4",
50+
"web-vitals": "5.0.1",
5151
"xml-js": "1.6.11"
5252
}
5353
}

src/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flask==3.1.0
1+
flask==3.1.1
22
flask-talisman==1.1.0
33
gunicorn==23.0.0
44
pytest==8.3.5
@@ -8,5 +8,5 @@ sqlfluff==3.4.0
88

99
# sql/util/* dependencies
1010
pandas==2.2.3
11-
google-cloud-bigquery==3.31.0
11+
google-cloud-bigquery==3.32.0
1212
requests==2.32.3

src/server/feature_policy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
feature_policy = {
2-
"accelerometer": "'none'",
32
"camera": "'none'",
43
"geolocation": "'none'",
5-
"gyroscope": "'none'",
64
"magnetometer": "'none'",
75
"microphone": "'none'",
86
"payment": "'none'",

src/static/js/send-web-vitals.js

Lines changed: 18 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,14 @@
22

33
function sendWebVitals() {
44

5-
function getLoafAttribution(attribution) {
6-
const loafEntriesLength = attribution?.longAnimationFrameEntries?.length || 0;
7-
if (loafEntriesLength === 0) {
8-
return {};
9-
}
10-
11-
let loafAttribution = {
12-
debug_loaf_script_total_duration: 0
13-
};
14-
15-
// The last LoAF entry is usually the most relevant.
16-
const loaf = attribution.longAnimationFrameEntries.at(-1);
17-
const loafEndTime = loaf.startTime + loaf.duration;
18-
loaf.scripts.forEach(script => {
19-
if (script.duration <= loafAttribution.debug_loaf_script_total_duration) {
20-
return;
21-
}
22-
loafAttribution = {
23-
// Stats for the LoAF entry itself.
24-
debug_loaf_entry_start_time: loaf.startTime,
25-
debug_loaf_entry_end_time: loafEndTime,
26-
debug_loaf_entry_work_duration: loaf.renderStart ? loaf.renderStart - loaf.startTime : loaf.duration,
27-
debug_loaf_entry_render_duration: loaf.renderStart ? loafEndTime - loaf.renderStart : 0,
28-
debug_loaf_entry_total_forced_style_and_layout_duration: loaf.scripts.reduce((sum, script) => sum + script.forcedStyleAndLayoutDuration, 0),
29-
debug_loaf_entry_pre_layout_duration: loaf.styleAndLayoutStart ? loaf.styleAndLayoutStart - loaf.renderStart : 0,
30-
debug_loaf_entry_style_and_layout_duration: loaf.styleAndLayoutStart ? loafEndTime - loaf.styleAndLayoutStart : 0,
31-
32-
// Stats for the longest script in the LoAF entry.
33-
debug_loaf_script_total_duration: script.duration,
34-
debug_loaf_script_compile_duration: script.executionStart - script.startTime,
35-
debug_loaf_script_exec_duration: script.startTime + script.duration - script.executionStart,
36-
debug_loaf_script_forced_style_and_layout_duration: script.forcedStyleAndLayoutDuration,
37-
debug_loaf_script_type: script.invokerType,
38-
debug_loaf_script_invoker: script.invoker,
39-
debug_loaf_script_source_url: script.sourceURL,
40-
debug_loaf_script_source_function_name: script.sourceFunctionName,
41-
debug_loaf_script_source_char_position: script.sourceCharPosition,
42-
43-
// LoAF metadata.
44-
debug_loaf_meta_length: loafEntriesLength,
45-
}
46-
});
47-
48-
if (!loafAttribution.debug_loaf_script_total_duration) {
49-
return {};
50-
}
51-
52-
// The LoAF script with the single longest total duration.
53-
return Object.fromEntries(Object.entries(loafAttribution).map(([k, v]) => {
54-
// Convert all floats to ints.
55-
return [k, typeof v == 'number' ? Math.floor(v) : v];
56-
}));
57-
}
58-
595
function sendWebVitalsGAEvents({name, delta, value, id, attribution, navigationType}) {
606

617
let overrides = {};
628

9+
function roundIfNotNull(x) {
10+
return x != null ? Math.round(x) : null;
11+
}
12+
6313
switch (name) {
6414
case 'CLS':
6515
overrides = {
@@ -76,18 +26,24 @@ function sendWebVitals() {
7626
debug_target: attribution.loadState || '(not set)',
7727
};
7828
break;
79-
case 'FID':
8029
case 'INP': {
81-
const loafAttribution = getLoafAttribution(attribution);
8230
overrides = {
8331
debug_event: attribution.interactionType,
84-
debug_time: Math.round(attribution.interactionTime),
32+
debug_time: roundIfNotNull(attribution.interactionTime),
8533
debug_load_state: attribution.loadState,
8634
debug_target: attribution.interactionTarget || '(not set)',
87-
debug_interaction_delay: Math.round(attribution.inputDelay),
88-
debug_processing_duration: Math.round(attribution.processingDuration),
89-
debug_presentation_delay: Math.round(attribution.presentationDelay),
90-
...loafAttribution
35+
debug_interaction_delay: roundIfNotNull(attribution.inputDelay),
36+
debug_processing_duration: roundIfNotNull(attribution.processingDuration),
37+
debug_presentation_delay: roundIfNotNull(attribution.presentationDelay),
38+
debug_totalPaintDuration: roundIfNotNull(attribution.totalPaintDuration),
39+
debug_totalScriptDuration: roundIfNotNull(attribution.totalScriptDuration),
40+
debug_totalStyleAndLayoutDuration: roundIfNotNull(attribution.totalStyleAndLayoutDuration),
41+
debug_totalUnattributedDuration: roundIfNotNull(attribution.totalUnattributedDuration),
42+
debug_longestScriptIntersectingDuration: roundIfNotNull(attribution.longestScript?.intersectingDuration),
43+
debug_longestScriptSubPart: attribution.longestScript?.subpart || null,
44+
debug_longestScriptInvoker: attribution.longestScript?.entry.invoker || null,
45+
debug_longestScriptInvokerType: attribution.longestScript?.entry.invokerType || null,
46+
debug_longestScriptName: attribution.longestScript?.entry.name || null,
9147
};
9248
break;
9349
}
@@ -98,7 +54,7 @@ function sendWebVitals() {
9854
debug_resource_load_delay: attribution.resourceLoadDelay,
9955
debug_resource_load_time: attribution.resourceLoadTime,
10056
debug_element_render_delay: attribution.elementRenderDelay,
101-
debug_target: attribution.element || '(not set)',
57+
debug_target: attribution.target || '(not set)',
10258
};
10359
break;
10460
case 'TTFB':
@@ -163,7 +119,6 @@ function sendWebVitals() {
163119
webVitals.onLCP(sendWebVitalsGAEvents);
164120
webVitals.onCLS(sendWebVitalsGAEvents);
165121
webVitals.onTTFB(sendWebVitalsGAEvents);
166-
webVitals.onFID(sendWebVitalsGAEvents);
167122
webVitals.onINP(sendWebVitalsGAEvents);
168123
} else {
169124
console.error('Web Vitals is not loaded!!');

0 commit comments

Comments
 (0)