Skip to content

QueenieCplusplus/React_favicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React_favicon

ico, 24*24, using convertico.com

demo:

icon

Converter

recommended converter from png to ico: convertico.com

where to place ico file?

dir called "root project/public/"

Where to implement?

  • Manifest.json

  • index.html

// Manifest.json

  {
    "short_name": "React App",
    "name": "Create React App Sample",
    "icons": [
      {
        "src": "favicon.ico",
        "sizes": "64x64 32x32 24x24 16x16",
        "type": "image/x-icon"
      },
      {
        "src": "logo192.png",
        "type": "image/png",
        "sizes": "192x192"
      },
      {
        "src": "logo512.png",
        "type": "image/png",
        "sizes": "512x512"
      }
    ],
    "start_url": ".",
    "display": "standalone",
    "theme_color": "#000000",
    "background_color": "#ffffff"
  }

// index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
  </head>
  <body>
  
  </body>
</html>

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will work correctly both with client-side routing and a non-root public URL.

About

browser logo (網址列小圖示) using 24*24 ico file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published