Nuxt.js: repeated requests for favicon.ico

Created on 11 Feb 2017  路  5Comments  路  Source: nuxt/nuxt.js

Hi,

Though the favicon.ico file is in static folder and the nuxt.config.js file has the following configuration :

...
link: [
      { rel: 'icon', type: 'image/x-icon', href: 'favicon.ico' }
    ]
...

i'm facing the following issue:

favicon - request

I also get an error in Chrome's console :
Failed to load resource: the server responded with a status of 404 (Not Found) for http://localhost:3000/stories/show/favicon.ico

Please suggest, what I need to do to avoid repeated requests to the server for favicon.io

Thanks.

This question is available on Nuxt.js community (#c202)
question

All 5 comments

Hi @app-sparkler

This request is made from Chrome automatically.

Do you have router.base option configured in your nuxt.config.js?

Hi @Atinux

i had to define the linkActiveClass so i had to add the router to configuration. This must have _overridden_ the default settings. I have altered it now, and this is how it looks :

// ROUTER CONFIGURATION
  router: {
    linkActiveClass: 'active',
    base: '/'
  }

The error on favicon request have stopped in Chrome; however, the requests are still being made for favicon.ico. This doesn't happen if Firefox so i think its not nuxt specific but a browser thing.

this is still happening for me even though I added a router.base & a router.linkActiveClass
the favicon appears in Firefox for me but not Chrome...any guesses why?

hi @kelleysy ,

NUXT ROUTER

This link might help you with a solution.

Good Luck...

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VincentLoy picture VincentLoy  路  3Comments

vadimsg picture vadimsg  路  3Comments

vadimsg picture vadimsg  路  3Comments

uptownhr picture uptownhr  路  3Comments

bimohxh picture bimohxh  路  3Comments