The browser tab shows the official site's mark - #826
Merged
Merged
Conversation
…, so /favicon.ico fell through to the SPA fallback Signed-off-by: Qishang Zhong <zhongqishang@gmail.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.
Problem
web/index.htmlcarried no<link rel="icon">. A browser therefore asked for/favicon.ico, which fell through the SPA's history fallback inwith_static_filesand came back as200 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 filehttps://utopia.bi/favicon.svgserves, byte for byte, so the app and the site show the same mark in the tab. Vite copiespublic/verbatim intodist/, andUTOPIA_WEB_DISTserves that root through the sameServeDir(root files getno-cache, and tower-http reportsimage/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 builtdist/favicon.svgis the file inweb/public/.GET /favicon.svganswers200,image/svg+xml,no-cache, and hashes the same asweb/public/favicon.svg;/carries the icon link.https://utopia.bi/favicon.svg; the mark is the same at every size.