Skip to content

docs(memory): how to detect unused assets (srcset/URL-encoding traps)#18

Merged
jansroka merged 1 commit into
mainfrom
memory-unused-assets
Jul 8, 2026
Merged

docs(memory): how to detect unused assets (srcset/URL-encoding traps)#18
jansroka merged 1 commit into
mainfrom
memory-unused-assets

Conversation

@jansroka

@jansroka jansroka commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Adds a memory/ note from the improve-system review of the CSP/cleanup session.

memory/finding-unused-assets.md captures the reusable method for checking whether an image/PDF/CSS class is genuinely unused — grep the built _site (HTML + CSS + site.webmanifest), not just source — and the two false-positive traps hit this session:

  • srcset variants: the index hero uses only InOEG_IRIS-One-Pager_Hero-p-*; the 2 MB full-size original is never referenced and never ships (so the earlier "optimise the 2 MB hero" idea was moot).
  • URL-encoded filenames: PDFs with spaces are linked via %20, so a plain grep -F misses them — all 13 documents/ PDFs are in fact used.

Also records the maintainer's decision not to delete orphaned images.

Not duplicated: the img-src 'self' data: rationale (needed for the external-link icon) was already added to csp-policy.md earlier this session.

🤖 Generated with Claude Code

…traps

Captures the reusable method for checking whether an image/PDF/CSS class is
really unused (grep the built _site including .webmanifest, not just source)
and the two false-positive traps hit this session: srcset responsive variants
(the 2 MB hero original never ships — only its -p-* variants) and URL-encoded
filenames (PDFs with %20). Also records the maintainer's decision not to
delete orphaned images.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jansroka jansroka merged commit afeb9f0 into main Jul 8, 2026
1 check passed
@jansroka jansroka deleted the memory-unused-assets branch July 8, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant