How to add a favicon to a Next.js static site?

Create a /static folder in project root. This will be added to the static export folder. Add favicon file in /static folder. Add _document.js to /pages/ folder according to documentation (nextjs.org) or documentation (github.com). Add <link rel=”shortcut icon” href=”https://stackoverflow.com/static/favicon.ico” /> to head. npm run build && npm run export P.S. Thanks to the previous answer … Read more

How to set-up a favicon?

With the introduction of (i|android|windows)phones, things have changed, and to get a correct and complete solution that works on any device is really time-consuming. You can have a peek at https://realfavicongenerator.net/favicon_compatibility or http://caniuse.com/#search=favicon to get an idea on the best way to get something that works on any device. You should have a look at … Read more

Does a favicon have to be 32×32 or 16×16?

Update for 2020: Sticking to the original question of 16×16 versus 32×32 icons: the current recommendation should be to provide a 32×32 icon, skipping 16×16 entirely. All current browsers and devices support 32×32 icons. The icon will routinely be upscaled to as much as 192×192 depending on the environment (assuming there are no larger sizes … Read more

How to prevent favicon.ico requests?

I will first say that having a favicon in a Web page is a good thing (normally). However it is not always desired and sometime developers need a way to avoid the extra payload. For example an IFRAME would request a favicon without showing it. Worst yet, in Chrome and Android an IFRAME will generate … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)