7

警告:誰かが行ってこれを複製としてマークする前にそうではないことを理解してください。受け入れられた答えはまさに私がしていることですが、私は次の問題に直面しています。

クライアントフォルダのHTMLファイルは次のようになります。

<head>
    <meta charset="utf-8"/>
    <title>blah-blah</title>
    ---

ファイアバグコンソールに表示されるメッセージは次のとおりです。

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.

ビューソースを実行すると、headとmeta charset要素の間に、たくさんのリンクスタイルシートとスクリプトタグが表示されます。

メタ文字セットを削除すると、firebugコンソールで次のようになります。

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.

メタ文字セットタグを頭の直後に表示するにはどうすればよいですか?

4

2 に答える 2

6

私が行ったことは、編集/usr/lib/meteor/app/lib/app.html.inし、メタ文字セット行を追加して、ファイルが次のようになるようにすることでした。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>    //**Added this line**
{{#each stylesheets}}  <link rel="stylesheet" href="{{this}}">
{{/each}}
...

そしてもちろん、htmlファイルからメタ文字セット行を削除しました。

私は今、これが進むべき道であり、これは将来の改訂で解決されると思います。

于 2012-09-03T10:59:09.300 に答える
1

IE で最新バージョンの使用を強制するという問題がありました。追加しなければなりませんでした

<meta http-equiv="x-ua-compatible" content="IE=edge">

タグのすぐ後ろ。そして、 app.html.in はもう使用されていないようです。

だから私はtools/latest/tools/bundler.jsでこれをやった

783号線

'<head><meta http-equiv="x-ua-compatible" content="IE=edge">\n');

そのため、html ボイラープレートに追加する必要がありました。

于 2014-02-04T08:28:25.903 に答える