Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

favicon is pinged for every location change in Chrome. #145

Closed
ctrlplusb opened this issue Oct 30, 2016 · 5 comments
Closed

favicon is pinged for every location change in Chrome. #145

ctrlplusb opened this issue Oct 30, 2016 · 5 comments

Comments

@ctrlplusb
Copy link
Owner

Getting network pulls with every render caused by client side route change.

I am not sure how react-helmet handles diff's/renders, but I may need to pull the script and link declarations out of the jsx and let them sit as constants.

@ctrlplusb
Copy link
Owner Author

Not a react-helmet issue.

Think the favicons need to be listed in the manifest.json

@ctrlplusb
Copy link
Owner Author

Argh, can't figure this one out. It appears to happen when using Chrome only. Any location change causes a network ping on the favicon. It comes back with a 304 response, but it's still an unnecessary network request. I can't seem to find anything that discusses what problem this is a symptom of.

@ctrlplusb ctrlplusb changed the title Strange favicon behaviour when registered via react-helmet favicon is pinged for every location change in Chrome. Oct 31, 2016
@elodszopos
Copy link
Contributor

Hey - I can see you closed this one down. How do you now it's not a react-helmet issue? For all I can tell, it is. Shouldn't react-helmet know the favicon didn't change and not make the request at all?

image

A little off-topic, but relating to unnecessary api requests - in your redux feature branch navigating between posts kept reloading each post even if already loaded. Was that only me or was that happening for you as well @ctrlplusb?

@elodszopos
Copy link
Contributor

Maybe this has something to do with it?

nfl/react-helmet#149

@Doeke
Copy link

Doeke commented Mar 30, 2017

For anyone running into the same issue (with react or another framework, I'm using VueJS):

Try reordering the favicon link tags. For me, putting the 16x16 link before 32x32 fixed this issue. As for why this works... I have no idea.

thejohnfreeman added a commit to thejohnfreeman/create-react-app that referenced this issue Aug 14, 2018
Chrome requests `favicon.ico` on every route change, but stops if the `<link>` for it occurs early enough in the page. [Several](https://stackoverflow.com/questions/35409588/favicon-requested-on-every-route-change) other [people](ctrlplusb/react-universally#145) have been running into this issue since at least February 2016.
uwolfer added a commit to uwolfer/favicons that referenced this issue Aug 26, 2018
- move favicons to top in order to fix Chrome issue which issues unnecessary network requests on route change; see also:
  - https://stackoverflow.com/questions/35409588/favicon-requested-on-every-route-change
  - ctrlplusb/react-universally#145
- preserve order of items inside one platform definition which allows to define a useful order

Fixes issue itgalaxy#145
uwolfer added a commit to uwolfer/favicons that referenced this issue Aug 26, 2018
- move favicons to top in order to fix Chrome issue which issues unnecessary network requests on route change; see also:
  - https://stackoverflow.com/questions/35409588/favicon-requested-on-every-route-change
  - ctrlplusb/react-universally#145
- preserve order of items inside one platform definition which allows to define a useful order

Fixes issue itgalaxy#234
brunocodutra pushed a commit to itgalaxy/favicons that referenced this issue Aug 30, 2018
- move favicons to top in order to fix Chrome issue which issues unnecessary network requests on route change; see also:
  - https://stackoverflow.com/questions/35409588/favicon-requested-on-every-route-change
  - ctrlplusb/react-universally#145
- preserve order of items inside one platform definition which allows to define a useful order

Fixes issue #234
Timer pushed a commit to facebook/create-react-app that referenced this issue Sep 21, 2018
Chrome requests `favicon.ico` on every route change, but stops if the `<link>` for it occurs early enough in the page. [Several](https://stackoverflow.com/questions/35409588/favicon-requested-on-every-route-change) other [people](ctrlplusb/react-universally#145) have been running into this issue since at least February 2016.
zmitry pushed a commit to zmitry/create-react-app that referenced this issue Sep 30, 2018
Chrome requests `favicon.ico` on every route change, but stops if the `<link>` for it occurs early enough in the page. [Several](https://stackoverflow.com/questions/35409588/favicon-requested-on-every-route-change) other [people](ctrlplusb/react-universally#145) have been running into this issue since at least February 2016.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants