Saltar al contenido
Skillpedia
Deploy y nube (DevOps)75 mil · #2938

mime-type

Qué hace

Esta skill revisa los encabezados de tipo de contenido que un servidor envía con HTML, CSS, JavaScript, imágenes y fuentes. Es para personas que gestionan servidores web o diagnostican recursos de página que no funcionan.

Cuándo usarla

  • ✓Cuando le pides al agente que compruebe si tu servidor envía los tipos de archivo correctos.
  • ✓Cuando una hoja de estilos o un script no carga y sospechas que el tipo de contenido es incorrecto.
  • ✓Cuando configuras un nuevo hosting o un nuevo framework y quieres confirmar que sus encabezados son correctos.

Link de la skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mime-type/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mime-type/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Mi CSS no se carga en el sitio. ¿Puedes comprobar si el servidor envía el tipo de contenido correcto?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente inspecciona los encabezados de respuesta de las páginas clave y de los archivos enlazados. Compara cada uno con el tipo esperado, como text/css para las hojas de estilo, y sugiere cambios en el servidor cuando no coinciden.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

MIME Type Validation

Incorrect MIME types cause browsers to block stylesheets and scripts (MIME sniffing is disabled by X-Content-Type-Options: nosniff), breaking page rendering and signalling poor site quality to crawlers.

Quick Reference

  • The Content-Type header must match the actual file type being served
  • HTML pages must be served as text/html; charset=utf-8
  • CSS files must be served as text/css and JavaScript as text/javascript
  • Incorrect MIME types cause browsers to block or mishandle resources

Check

For key pages and their linked resources, inspect the HTTP Content-Type response header. Verify HTML responses use text/html; charset=utf-8, CSS uses text/css, JS uses text/javascript, and images use image/jpeg, image/png, etc.

Fix

Update your server configuration to serve each file type with its correct MIME type. Set X-Content-Type-Options: nosniff to prevent browsers from guessing content types. In Next.js and similar frameworks, configure headers in next.config.js.

Explain

The Content-Type header tells browsers and crawlers what kind of content is being sent. When it mismatches the actual file type, browsers either block the resource or render it incorrectly—CSS served as text/plain won't be applied, and JavaScript served as text/html may be blocked by strict MIME checking.

Code Review

For HTML, CSS, and JS assets, check the Content-Type response header. Verify HTML responses include 'charset=utf-8'. Check that X-Content-Type-Options: nosniff is set. Flag any resource returning Content-Type: text/html that is not an HTML page. Check for missing charset declarations on text responses.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/mime-type

Preguntas frecuentes

¿Qué pasa cuando el tipo de contenido es incorrecto?

Los navegadores pueden bloquear el archivo o mostrarlo mal, así que una hoja de estilos puede no aplicarse en absoluto.

¿Qué hace nosniff?

El encabezado X-Content-Type-Options indica a los navegadores que no adivinen el tipo, así que se basan en el valor que envía el servidor.

¿Cómo se configura esto en Next.js?

La skill sugiere configurar los encabezados en el archivo next.config.js.

Detalles

Descripción original del autor

Use when auditing server configuration or diagnosing broken resources. Applies to any web server serving HTML, CSS, JS, images, fonts, or other static assets.

repo: thedaviddias/Front-End-Checklist

Popularidad

Estrellas en GitHub
75 mil
Posición en el ranking
#2938
Licencia
MIT
Actualizada
31/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas