0

How can I set a encoding for my pages served with meteor? Currently my Firefox keeps on outputting this warning:

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

1 に答える 1

1

<head>HTMLファイルの任意のセクション内にエンコーディングを設定するだけです。

<head>
    <meta charset="UTF-8">
    <title>Whatever</title>
</head>

Meteorのドキュメントから:

MeteorアプリケーションのHTMLファイルは、サーバー側のフレームワークとはかなり異なる方法で処理されます。Meteorは、ディレクトリ内のすべてのHTMLファイルをスキャンして、、、、および の3つ<head>の最上位要素を探します。頭と体のセクションは別々に連結されて単一の頭と体になり、最初のページの読み込み時にクライアントに送信されます。<body><template>

于 2012-08-01T19:38:33.777 に答える