Skip to content

The browser tab shows the official site's mark - #826

Merged
WaylandYang merged 2 commits into
deeplethe:devfrom
zhongqishang:tab-favicon
Sep 20, 2026
Merged

WaylandYang merged 2 commits into
deeplethe:devfrom
zhongqishang:tab-favicon

Conversation

@zhongqishang

Copy link
Copy Markdown
Contributor

Problem

web/index.html carried no <link rel="icon">. A browser therefore asked for /favicon.ico, which fell through the SPA's history fallback in with_static_files and came back as 200 text/html — the page itself — so the tab carried the browser's default globe instead of the project's mark.

Change

  • web/public/favicon.svg — the file https://utopia.bi/favicon.svg serves, byte for byte, so the app and the site show the same mark in the tab. Vite copies public/ verbatim into dist/, and UTOPIA_WEB_DIST serves that root through the same ServeDir (root files get no-cache, and tower-http reports image/svg+xml), so no server change was needed.
  • web/index.html<link rel="icon" type="image/svg+xml" href="/favicon.svg">.

SVG only. Safari 17 and older, and apple-touch-icon, want a bitmap; this change does not add one.

Checks

  • pnpm build (style guard, tsc --noEmit, vite) passes, and the built dist/favicon.svg is the file in web/public/.
  • Against the deployed build: GET /favicon.svg answers 200, image/svg+xml, no-cache, and hashes the same as web/public/favicon.svg; / carries the icon link.
  • Both files were rendered in Chromium at 16/32/64/128 px side by side with https://utopia.bi/favicon.svg; the mark is the same at every size.

…, so /favicon.ico fell through to the SPA fallback

Signed-off-by: Qishang Zhong <zhongqishang@gmail.com>
@WaylandYang
WaylandYang merged commit 2bedda2 into deeplethe:dev Sep 20, 2026
4 checks passed
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.

2 participants