According to the HTML5 specification,
The element containing the character encoding declaration must be serialized completely within the first 1024 bytes of the document.
However, as far as I can tell, react-helmet makes no attempt to output any configured <meta charset='...'> tag as the first thing in the <head> element; in fact it appears to always be output after the <title>. If other code is also writing to the <head> (e.g. styled-components), this could push the charset specification well past that 1024 byte cutoff.
Is it possible to modify the output order of the head elements produced by react-helmet?
@tinynumbers on the server side, you can control the ordering of groups of head information (i.e. meta tags before title tag before link tags). And the ordering of tags should stay the same order they were given as props to Helmet. On the client, you're right, the code doesn't try to maintain this order. We can look into fixing that. Thanks!
+1 for this: I'm prerendering my page with puppeeter but title is placed below the styling thus google does not find it.
Have anyone solved this issue ?
Bump, still no solution to this issue.
Would help greatly with prerenderers such as puppeeter.
Any solution yet for this ??
Most helpful comment
Have anyone solved this issue ?