Jump to content

Community

<meta charset="utf-8"> must be the first element in <head>


Recommended Posts

25 minutes ago, Jimi Wikman said:

That is because of all the JS added there and neither GA or Yandex is standard as far as I know?.

Are you using a plugin for them or have you modified the code yourself by any chance?

I suspect they've added code in the textarea parts where the software allows you to, rather than in any template files.
The same thing appears in the source code for this community too.

Edited by Chippy365
Link to post
Share on other sites
13 minutes ago, Chippy365 said:

I suspect they've added code in the textarea parts where the software allows you to, rather than in any template files.
The same thing appears in the source code for this community too.

Yes, you are right.

The global template actually add this ahead of the meta information, which is a bit odd.

@Mr 13 maybe add this as a bug in the bugtracker to get this fixed for 4.5?

Link to post
Share on other sites

...and it will not actually cause any issues to have the charset metatag after the JS so this is not a big deal unless you want to validate for any reason.

UTF-8 is standard and the JS does not render anything in the DOM. I think the limit of having the charset defined within the first 1024 (used to be 512) characters is a legacy issue from older browsers, but unless you have pages with other charset there should not be any issues with pre-rendering.

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy