Caveat: Before someone goes and marks this as duplicate of this, please understand that it is not. The accepted answer is exactly what I am doing, yet I am facing the following issue.
HTML file in client folder looks like this:
<head>
<meta charset="utf-8"/>
<title>blah-blah</title>
---
The message I am getting in the firebug console is:
The character encoding declaration of the HTML document
was not found when prescanning the first 1024 bytes of
the file. When viewed in a differently-configured browser,
this page will reload automatically. The encoding
declaration needs to be moved to be within the first
1024 bytes of the file.
When I do a view source, between the head and the meta charset element, I see a whole bunch of link stylesheet and script tags.
If I remove the meta charset, I get this in the firebug console:
The character encoding of the HTML document was not
declared. The document will render with garbled text
in some browser configurations if the document
contains characters from outside the US-ASCII range.
The character encoding of the page must to be declared
in the document or in the transfer protocol.
How do I get the meta charset tag to appear right after the head?
<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings. Metadata will not be displayed on the page, but is machine parsable.
Furthermore, most browsers use UTF-8 by default if no character encoding is specified. But because that's not guaranteed, it's better to just include a character encoding specification using the <meta> tag in your HTML file. There you have it.
META tags are only allowed within HEAD (just like, say, TITLE) so by putting it into a BODY, you're essentially creating an invalid markup.
What I did was edit /usr/lib/meteor/app/lib/app.html.in
, and add the meta charset line so that the file now looks like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/> //**Added this line**
{{#each stylesheets}} <link rel="stylesheet" href="{{this}}">
{{/each}}
...
And of course I removed the meta charset line from my html files.
I think right now, this would be the way to go and this will be resolved in future revisions.
I had the problem in IE to force to use the latest version. I had to add
<meta http-equiv="x-ua-compatible" content="IE=edge">
Directly behind the tag. And app.html.in seems not to be used anymore.
So I did this on tools/latest/tools/bundler.js
Line 783
'<head><meta http-equiv="x-ua-compatible" content="IE=edge">\n');
That forced it to add it in the html boilerplate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With