Influencing the encoding for pages served by meteor?

后端 未结 1 2039
南旧
南旧 2021-01-25 20:55

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 no

相关标签:
1条回答
  • 2021-01-25 21:26

    Just set your encoding inside any <head> section of a html file:

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

    From Meteor's documentation:

    HTML files in a Meteor application are treated quite a bit differently from a server-side framework. Meteor scans all the HTML files in your directory for three top-level elements: <head>, <body>, and <template>. The head and body sections are separately concatenated into a single head and body, which are transmitted to the client on initial page load.

    0 讨论(0)
提交回复
热议问题