Skip to content

How come favicon only updates when I move my favicon.ico into my public folder instead of inside my app directory? #65938

Closed Answered by hasan-mohammad-bd
victornasar asked this question in Help
Discussion options

You must be logged in to vote

It sounds like you're experiencing some caching issues with your favicon in a Next.js app. Here's a breakdown of what's happening:

  1. Cache persistence: When you replaced the favicon in the app folder, the old favicon was still cached by your browser, so you continued to see it.
  2. Update by moving to public folder: By moving the new favicon to the public folder, you triggered a cache update, and the new favicon was loaded, resulting in a 200 status code (success).
  3. 304 error after refresh: The 304 status code indicates that the browser has cached the favicon and is reusing the cached version instead of reloading it from the server. This is a normal behavior, as the browser is trying to optimiz…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@victornasar
Comment options

@hasan-mohammad-bd
Comment options

Answer selected by victornasar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants