mattdesl / budo

:clapper: a dev server for rapid prototyping
MIT License
2.18k stars 106 forks source link

Favicon suppression #249

Closed benburrill closed 4 years ago

benburrill commented 4 years ago

budo currently mounts a null favicon on top of the static /favicon.ico. As per #69, this is to prevent favicon 404s from appearing in the browser console. However, budo really should serve that "default" null favicon as an actual default (only when /favicon.ico doesn't exist) so that I see my beautiful favicon in budo.

I have implemented the above approach as PR #250.

Another option would be to use the favicon option of simple-html-index to add a null favicon by data uri in a link tag to the default index. That way, there would be no favicon browser console errors for the default index, but if you supply a custom index.html, the user would need to suppress it themselves with a link tag or by adding a /favicon.ico, just as they would normally for that page.

The advantage to that idea over #250 would be that there would be that budo would better replicate the behavior of other static servers when an index.html is provided. This doesn't really matter, but would make it more obvious to the user that there is no favicon for the page when they are testing in budo, so there are no "surprise" console errors when they run a normal static server.