maui icon indicating copy to clipboard operation
maui copied to clipboard

favicon.ico is not needed in MAUI Blazor Hybrid application

Open pekspro opened this issue 2 years ago • 4 comments
trafficstars

Description

When you create a new MAUI Blazor Hybrid application (both in .NET 7 and .NET 8 previes) a favicon.ico file is added wwwroot folder. This file is never visible (I think!), so it can be removed.

If it is removed, the embedded browser (at least in Windows) will try to load that file. But that can be prevent by adding this line in the header in index.html:

<link rel="icon" href="data:,">

pekspro avatar Aug 04 '23 12:08 pekspro

Hmm interesting idea! We'll need to try this on each platform but it could be a nice simplification!

Eilon avatar Aug 04 '23 16:08 Eilon

It's better be there for not having that annoying error in devtools console!

Failed to load resource: net::ERR_CONNECTION_CLOSED /favicon.ico:1

mhrastegari avatar Jan 03 '24 18:01 mhrastegari

@mhrastegari, I don't get any such warning if I have <link rel="icon" href="data:,">. Only if I have no rel="icon" at all.

pekspro avatar Jan 04 '24 15:01 pekspro

Verified this issue with Visual Studio Enterprise 17.10.0 Preview 1. After deleting favicon.ico/favicon.png in .NET 7 and .NET 8 projects, I don't get any errors and can debug normally.

jaosnz-rep avatar Feb 20 '24 09:02 jaosnz-rep

Fixed in #23615

Eilon avatar Jul 17 '24 16:07 Eilon