Skip to content

Do not count an icon answered with the page as a page view - #121

Merged
Kaliumhexacyanoferrat merged 1 commit into
mainfrom
analytics-files-are-no-pages
Oct 14, 2026
Merged

Kaliumhexacyanoferrat merged 1 commit into
mainfrom
analytics-files-are-no-pages

Conversation

@Kaliumhexacyanoferrat

Copy link
Copy Markdown
Collaborator

The analytics of a single page app listed /favicon.ico and /apple-touch-icon*.png as pages people opened.

Why: the app answers every path with its index.html (200, text/html), and a browser fetching a site's icons sends no Sec-Fetch-Dest. So the rule for programs that send no such header - a successful GET answered with HTML is a page - counted them.

Change: without Sec-Fetch-Dest, a request for a file with a known ending (images, icons, scripts, style sheets, fonts, manifests, media, …) is no page, whatever it was answered with. It is a short list, not every ending, since /user/jane.doe or /release/1.2 may well be pages. When a browser marks a request as a navigation, that still decides.

Days already counted keep these views.

  • Test: AnIconAnsweredWithThePageIsNoPage
  • README: what a view is

🤖 Generated with Claude Code

A single page app answers every path with its page, /favicon.ico and the
Apple touch icons included, and a browser fetching a site's icons sends no
Sec-Fetch-Dest - so the rule for programs (a GET answered with HTML) took
them for pages opened. A request without the header for a file with a known
ending of an image, a script, a style sheet, a font and the like is no page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Kaliumhexacyanoferrat
Kaliumhexacyanoferrat merged commit f1b0c04 into main Oct 14, 2026
2 checks passed
@Kaliumhexacyanoferrat
Kaliumhexacyanoferrat deleted the analytics-files-are-no-pages branch October 14, 2026 12:17
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