A favicon.ico beside the SVG icon #157

Open
opened 2026-11-06 17:41:38 +01:00 by miko · 0 comments
Owner

Problem

kataba's only favicon is src/app/icon.svg (plus apple-icon for iOS). /favicon.ico answers 404, as the not-found page.

Browsers and services that don't use the SVG icon, or only ever ask for /favicon.ico, show no icon for kataba: feed readers, bookmark sync, link previews, some browsers. In Vivaldi the tab of a local instance showed no icon while Safari showed it, though both got the same <link rel="icon"> (which may also be Vivaldi's favicon cache).

Wanted

  • src/app/favicon.ico next to icon.svg, so Next serves /favicon.ico and links it in <head>, with the same mark as the SVG at 16, 32 and 48 px.
  • An ICO can't follow the colour scheme the way the SVG does with prefers-color-scheme, so it needs one look that is readable on light and dark tab strips (e.g. the dark mark on a light rounded square, or the brand colour).
  • Move favicon.ico from RESERVED_PAGE_SLUGS into APP_ROUTE_NAMES (src/contentPages/slug.ts): otherwise the guest 404 proxy (hiddenFromGuest) takes it for a page slug and answers guests with the not-found page, as it does now. Then check that /favicon.ico answers 200 with image/x-icon for guests, on the dev server and in the Docker image.
## Problem kataba's only favicon is `src/app/icon.svg` (plus `apple-icon` for iOS). `/favicon.ico` answers 404, as the not-found page. Browsers and services that don't use the SVG icon, or only ever ask for `/favicon.ico`, show no icon for kataba: feed readers, bookmark sync, link previews, some browsers. In Vivaldi the tab of a local instance showed no icon while Safari showed it, though both got the same `<link rel="icon">` (which may also be Vivaldi's favicon cache). ## Wanted - `src/app/favicon.ico` next to `icon.svg`, so Next serves `/favicon.ico` and links it in `<head>`, with the same mark as the SVG at 16, 32 and 48 px. - An ICO can't follow the colour scheme the way the SVG does with `prefers-color-scheme`, so it needs one look that is readable on light and dark tab strips (e.g. the dark mark on a light rounded square, or the brand colour). - Move `favicon.ico` from `RESERVED_PAGE_SLUGS` into `APP_ROUTE_NAMES` (`src/contentPages/slug.ts`): otherwise the guest 404 proxy (`hiddenFromGuest`) takes it for a page slug and answers guests with the not-found page, as it does now. Then check that `/favicon.ico` answers 200 with `image/x-icon` for guests, on the dev server and in the Docker image.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba#157
No description provided.