luci-theme-openwrt-2020: Fix Safari favicon: use PNG alongside with SVG
authorSergey Ponomarev <stokito@gmail.com>
Tue, 12 Dec 2023 14:19:52 +0000 (16:19 +0200)
committerSergey Ponomarev <stokito@gmail.com>
Tue, 12 Dec 2023 18:24:12 +0000 (20:24 +0200)
Chrome, Edge and Firefox will use the SVG icon but Safari will use the PNG.
Chrome will try to pick an icon with a best suited dimension.
So it will also download the PNG to check it's dimension.
The explicitly specified sizes are preventing this.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut

index fa9dea47b7c1ac07c91ed013c54c1104d543cae4..38fabea55638d2d5b02fd52f9512b07f62cd2a4a 100644 (file)
@@ -19,7 +19,8 @@
 <meta name="viewport" content="width=device-width, initial-scale=1" />
 <meta name="apple-mobile-web-app-capable" content="yes" />
 <link rel="stylesheet" type="text/css" media="screen" href="{{ media }}/cascade.css" />
-<link rel="icon" href="{{ media }}/logo.svg" />
+<link rel="icon" href="{{ media }}/logo.png" sizes="180x180">
+<link rel="icon" href="{{ media }}/logo.svg" sizes="any">
 <link rel="apple-touch-icon" href="{{ media }}/logo.png" />
 <script type="text/javascript" src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
 <script type="text/javascript" src="{{ resource }}/cbi.js"></script>