본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)75k · #2938

mime-type

하는 일

이 스킬은 서버가 HTML, CSS, 자바스크립트, 이미지, 폰트와 함께 보내는 콘텐츠 타입 헤더를 확인합니다. 웹 서버를 관리하거나 깨진 페이지 리소스를 진단하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓서버가 올바른 파일 타입을 보내는지 확인해 달라고 요청할 때.
  • ✓스타일시트나 스크립트가 로드되지 않고 콘텐츠 타입이 잘못된 것 같을 때.
  • ✓새 호스팅이나 프레임워크를 설정하면서 헤더가 올바른지 확인하려 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mime-type/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 사이트에서 CSS가 로드되지 않아요. 서버가 올바른 콘텐츠 타입을 보내는지 확인해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 주요 페이지와 연결된 파일의 응답 헤더를 검사하고, 각 헤더를 예상 타입과 비교합니다. 예를 들어 스타일시트는 text/css여야 하며, 일치하지 않으면 서버 변경을 제안합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

자주 묻는 질문

콘텐츠 타입이 틀리면 어떻게 되나요?

브라우저가 파일을 막거나 잘못 표시할 수 있어서, 스타일시트가 전혀 적용되지 않을 수 있다고 스킬은 설명합니다.

nosniff는 무엇을 하나요?

X-Content-Type-Options 헤더는 브라우저가 타입을 추측하지 말고 서버가 보낸 값을 따르도록 합니다.

Next.js에서는 어떻게 설정하나요?

next.config.js 파일에서 헤더를 설정하라고 스킬은 제안합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
75k
순위
#2938
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬