Direct answer: 23 of the 25 sites yielded 127 JS/CSS resources (65 JS, 62 CSS) carrying 4,864 comments and 1,599.7 KB (about 1.56 MB), roughly 55 times the 900 comments and 29.1 KB found in homepage HTML last round. Eight comments on six sites carry sourceMappingURL, 13 TODO markers on four sites, 67 licence comments on 14 sites, 74 version strings on 22 sites and 61 long comments on 23 sites; e-mail, local paths and author markers are all zero. E18 and E20 returned no readable resources and are excluded rather than counted as zero comments.
Only the first three CSS and first three JS resources per site are read; a fuller inventory is in the homepage resource pilot.
Method: the first three CSS and first three JS per site
On 2026-11-09 between 03:40 and 03:41 we fetched the HTML of the same 25 cached-200 homepages, took the first three stylesheet URLs and the first three <script src> URLs, downloaded each as text and extracted comments. Every /* … */ block counts; JS // … lines count, but slashes preceded by a colon (as in http://) are excluded.
| Measure | Rule | Boundary |
|---|---|---|
| Comments | CSS block comments; JS block and line comments | Text approximation, not a JS parser |
| sourceMappingURL | sourceMappingURL= inside a comment | The .map file is not downloaded |
| Licence | @license, copyright, licensed under, MIT/Apache/BSD License | Compliance text, not to be removed |
| TODO / version | TODO/FIXME/XXX/HACK; @version, version, v1.2 | Literal matching |
| Long comment | More than 300 characters in one comment | Character count approximates size |
Result: comment volume is 55 times the HTML figure
| Measure | Count | Sites |
|---|---|---|
| Resources (JS / CSS) | 127 (65 / 62) | 23 |
| Comments | 4,864 | 23 |
| Comment size | 1,599.7 KB | — |
| sourceMappingURL | 8 | 6 |
| TODO / FIXME | 13 | 4 |
| Licence comments | 67 | 14 |
| Version strings | 74 | 22 |
| Long comments (over 300 characters) | 61 | 23 |
| E-mail / local path / author marker | 0 / 0 / 0 | 0 |
Compared with HTML comments
| Measure | HTML (last round) | JS/CSS (this round) |
|---|---|---|
| Unit | 25 pages | 127 resources (23 sites) |
| Comments | 900 | 4,864 |
| Comment size | 29.1 KB | 1,599.7 KB |
| 8 comments / 7 sites | 0 | |
| Local path / private host | 4 comments / 1 site | 0 |
| TODO | 0 | 13 comments / 4 sites |
| Version strings | 0 | 74 comments / 22 sites |
| Licence | — | 67 comments / 14 sites |
| sourceMappingURL | — | 8 comments / 6 sites |
Volume is concentrated: E28 has 337.4 KB (1,637 comments), E25 has 223.7 KB in only four comments, E04 has 133.2 KB (957) and E29 97.2 KB (six). Five sites each hold about 83 KB in just 11–16 comments (E03, E09, E14, E22, E23) with a very similar shape, suggesting one shared third-party bundle with a long banner. Count and size are not the same thing: E25's four comments average over 50 KB each.
The risks differ from HTML: resources contain no e-mail, no internal path and no author marker, but they do carry eight sourceMappingURL directives and 13 TODO markers. A source map can reconstruct the original source structure, so whether to publish it is a release decision; TODOs expose unfinished work. Licence and version strings are mostly routine third-party declarations and should not be removed blindly.
What this means for acceptance
- Strip resources first. 1.56 MB against 29.1 KB in HTML; minification and comment removal pay off here.
- Decide the sourceMappingURL policy. Eight on six sites; publishing a source map publishes the source structure, so not shipping it in production is the safer default.
- Keep licence comments. Sixty-seven on 14 sites are compliance statements; minifiers can preserve
/*!blocks and licence text. - Clear TODO and version strings before launch. Thirteen TODOs on four sites and 74 version strings; the first exposes unfinished work, the second aids fingerprinting.
- Inspect the shared bundle's large comment. Five sites hold about 83 KB each with a similar shape; confirm whether it is the same package, then decide on tree-shaking or a different build. See the website development service.
Limits
- Limited resources: only the first three CSS and first three JS per site, not a full inventory.
- Text approximation: the line-comment rule excludes
http://, but//inside strings can still be miscounted. - No .map download: only the sourceMappingURL comment is counted; whether the file is reachable is not tested.
- Two sites without resources: E18 and E20 returned no readable resources and are excluded, not counted as zero comments.
- 25-site pilot: the same equipment-company sample; no industry claim.
Data and reproduction
Anonymised data: equipment-homepage-resource-comments-2026.csv (25 rows × 16 columns: resource count, JS/CSS count, comments and size, source map/TODO/licence/version/long-comment counts and time). The repository keeps docs/research/2026-11-homepage-resource-comments.csv.
Parser: scripts/resource_comment_probe.py; unit tests: scripts/test_content_resource_comment_probe.py (10, offline). Run:
python -m unittest scripts.test_content_resource_comment_probe
Related: the homepage source-comment audit (HTML), the homepage resource inventory pilot, and the homepage HTML weight composition pilot.
Sources and definitions
- Sample: the 25 study-4 homepages cached as 200; 23 yielded 127 resources.
- Resource selection: the first three external CSS files and the first three
<script src>URLs per site. - Fetch: 2026-11-09 03:40–03:41 Asia/Shanghai, serial, 0.2 s between resources, 12-second timeout.
- Definitions: block comments plus JS line comments; sourceMappingURL, licence, TODO, version and long comments matched literally.
Frequently asked questions
Why do resources carry so many more comments than HTML?
Mostly unminified libraries, licence banners and development notes. Last round, 25 homepages held 900 HTML comments and 29.1 KB; this round, 127 resources hold 4,864 comments and 1,599.7 KB, about 55 times as much.
What does sourceMappingURL expose?
It points to a .map file that can reconstruct the original source, including file names, identifiers and structure. Eight comments on six sites carry it; publishing source maps is a release decision, not a default.
Should licence comments be removed?
No. Licence banners are a compliance requirement, and minifiers usually keep comments that start with /*!. This round found 67 on 14 sites, mostly from third-party libraries.
No e-mail appeared in resource comments; does that make JS safer?
Only that the six resources fetched per site did not contain one. More scripts and stylesheets were not read, so “JS is safer” is not a valid conclusion.
How can E25 have four comments and 223.7 KB?
A single very long block: a large legal or copyright banner inside a minified bundle. Count and size must be read separately, which is why this study does not rank by count alone.
Can the data be re-checked?
Yes. The public CSV has 25 rows by 16 columns, and scripts/resource_comment_probe.py has 10 offline unit tests.