Jump to content

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


Recommended Posts

Posted

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?

Posted (edited)
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
Posted
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?

Posted

...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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...