Document: contentType property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Document.contentType 은 document가 렌더링 되는 MIME 타입을 반환하는 읽기 전용 속성입니다. Document.contentType은 HTTP 헤더나 그 외에 MIME 정보 출처에서 나올 수 있으며 브라우저나 확장 프로그램에서 수행하는 자동 타입 변환의 영향을 받을 수 있습니다.

참고 : 이 속성은 <meta>에 영향을 받지 않습니다.

contentType은 읽기 전용 속성입니다.

명세서

Specification
DOM
# ref-for-dom-document-contenttype①

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
contentType

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Has more compatibility info.