favicon not updating.
Answered
Sloughi posted this in #help-forum
SloughiOP
Started working on a website about a month ago. Replaced the next.js favicon.ico in the app folder with my own. The change was reflected in the browser immediately.
About a week ago I had to make some changes to the favicon so i replaced it again. However, it still hasn't updated in my browser. I've tried deleting my browser cache, and adding this to layout.js metadata
About a week ago I had to make some changes to the favicon so i replaced it again. However, it still hasn't updated in my browser. I've tried deleting my browser cache, and adding this to layout.js metadata
icons: {
icon: '/favicon.ico',
// You can also specify different sizes
apple: [
{ url: '/apple-icon.png' },
{ url: '/apple-icon-180x180.png', sizes: '180x180', type: 'image/png' },
],
},
Answered by B33fb0n3
you
Of course you can also just put your
icons
key, is not a object. Instead it's an array. So provide your links like this:icons: ["/favicon.ico", "/apple-icon.png", "/apple-icon-180x180.png"]
Of course you can also just put your
favicon.ico
inside the app/
folder and remove this icons:
part9 Replies
SloughiOP
ive also tried this
@Sloughi Started working on a website about a month ago. Replaced the next.js favicon.ico in the app folder with my own. The change was reflected in the browser immediately.
About a week ago I had to make some changes to the favicon so i replaced it again. However, it still hasn't updated in my browser. I've tried deleting my browser cache, and adding this to layout.js metadata icons: {
icon: '/favicon.ico',
// You can also specify different sizes
apple: [
{ url: '/apple-icon.png' },
{ url: '/apple-icon-180x180.png', sizes: '180x180', type: 'image/png' },
],
},
you
Of course you can also just put your
icons
key, is not a object. Instead it's an array. So provide your links like this:icons: ["/favicon.ico", "/apple-icon.png", "/apple-icon-180x180.png"]
Of course you can also just put your
favicon.ico
inside the app/
folder and remove this icons:
partAnswer
SloughiOP
Thanks
@B33fb0n3 you ``icons`` key, is not a object. Instead it's an array. So provide your links like this:
tsx
icons: ["/favicon.ico", "/apple-icon.png", "/apple-icon-180x180.png"]
Of course you can also just put your `favicon.ico` inside the ``app/`` folder and remove this `icons:` part
SloughiOP
Hmm. this worked for local host but it still shows the old favicon in production
Actually, its showing that theres no favicon
SloughiOP
Got it
@Sloughi Hmm. this worked for local host but it still shows the old favicon in production
let google recrawl your site and it will be there as well 👍
happy to help