Home > Blockchain >  How can I add favicon.ico?
How can I add favicon.ico?

Time:11-28

I created a favicon from https://www.favicon.cc and replaced the existing favicon.ico to mine but it didn't change to my favicon.ico and still showing the previous icon

Code:

link rel="icon" href="/favicon.ico"

The location is at the same as for previous one

main.html(I am using VUE)

 <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <!-- favicon added -->
        <link rel="icon"      href="/favicon.ico">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>...</title>
      </head>
      <body>
        <div id="app"></div>
        <!-- main typescript file added -->
        <script type="module" src="/">.   </script>
      </body>
    </html>

CodePudding user response:

Browser cache clean was required

Credit: Vladimir https://stackoverflow.com/users/19636184/vladimir

CodePudding user response:

It looks like you are on the right track. Are you positive the new file is in the root directory?

<!DOCTYPE html>
<html>

<head>
  <link rel="icon" type="image/x-icon" href="/favicon.ico">
</head>

<body>
</body>

</html>

  • Related