2012-09-03 20 views
7

Advertencia: Antes de que alguien vaya y lo marque como duplicado de this, tenga en cuenta que no es así. La respuesta aceptada es exactamente lo que estoy haciendo, sin embargo, estoy enfrentando el siguiente problema. archivoMetaetiqueta no en los primeros 1024 bytes

HTML en carpeta del cliente se ve así:

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

El mensaje que estoy recibiendo en la consola de Firebug es:

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. 

Cuando hago una vista de origen, entre la cabeza y el elemento meta charset, veo un montón de etiquetas de script y hoja de estilo de enlace.

Si quito el juego de caracteres meta, me sale esto en la consola de 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. 

¿Cómo consigo la etiqueta charset meta que aparezca inmediatamente después de la cabeza?

Respuesta

6

Lo que hice fue editar /usr/lib/meteor/app/lib/app.html.in, y añadir la línea de meta charset para que el archivo ahora se ve así:

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

Y por supuesto que eliminan la línea de meta charset de mis archivos html.

Creo que en este momento, este sería el camino a seguir y esto se resolverá en futuras revisiones.

1

Tuve el problema en IE para forzar el uso de la última versión. he tenido que añadir

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

Directamente detrás de la etiqueta. Y app.html.in parece que ya no se usa.

Así que hice esto en herramientas/noticias/herramientas/bundler.js

Línea 783

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

Eso lo obligó a añadir en el texto modelo html.

Cuestiones relacionadas