Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
thedaviddias avatar

Mime Type

  • 1 installs
  • 73.4k repo stars
  • Updated June 18, 2026
  • thedaviddias/frontendchecklist

Inspects HTTP Content-Type headers for pages and assets and fixes server config so each file type is served with its correct MIME type.

About

Checks that HTML, CSS, JS, and image responses carry the correct Content-Type header so browsers do not block resources under nosniff. A developer uses it when auditing server configuration or diagnosing broken resources.

  • HTML must be text/html, CSS text/css, JS text/javascript
  • Set X-Content-Type-Options: nosniff to prevent sniffing

Mime Type by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,710 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/thedaviddias/frontendchecklist --skill mime-type

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars73.4k
Last updatedJune 18, 2026
Repositorythedaviddias/frontendchecklist

What it does

Inspects HTTP Content-Type headers for pages and assets and fixes server config so each file type is served with its correct MIME type.

Files

SKILL.mdMarkdownGitHub ↗

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/en/rules/seo/mime-type

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.