Repository navigation
Do not count an icon answered with the page as a page view - #121
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The analytics of a single page app listed
/favicon.icoand/apple-touch-icon*.pngas 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 noSec-Fetch-Dest. So the rule for programs that send no such header - a successfulGETanswered 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.doeor/release/1.2may well be pages. When a browser marks a request as a navigation, that still decides.Days already counted keep these views.
AnIconAnsweredWithThePageIsNoPage🤖 Generated with Claude Code