Skip to content
This repository has been archived by the owner. 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

Comments

@ctrlplusb
Copy link
Owner

commented Oct 30, 2016

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

This comment has been minimized.

Copy link
Owner Author

commented Oct 30, 2016

Not a react-helmet issue.

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

@ctrlplusb

This comment has been minimized.

Copy link
Owner Author

commented Oct 31, 2016

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
@ctrlplusb ctrlplusb closed this Dec 6, 2016
@elodszopos

This comment has been minimized.

Copy link
Contributor

commented Dec 27, 2016

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

This comment has been minimized.

Copy link
Contributor

commented Dec 27, 2016

Maybe this has something to do with it?

nfl/react-helmet#149

@Doeke

This comment has been minimized.

Copy link

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 added 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 added 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.
prichodko added a commit to strvcom/strv-react-scripts that referenced this issue Sep 26, 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.
Projects
None yet
3 participants
You can’t perform that action at this time.