일반 HTTP Content-Type 정리

황제낙엽 2013.09.30 17:37 조회 수 : 431

sitelink1 http://hbesthee.tistory.com/45 
sitelink2 http://www.iana.org/assignments/media-types/ 
sitelink3  
sitelink4  
extra_vars4  
extra_vars5  
extra_vars6  
언어에 따른 선언 방식
ASP<% Response.ContentType = "text/html" %>
JSP<%@ page contentType="text/html" %>
PHP<?PHP header("Content-Type:text/html"); ?>
Perlprint "Content-type: text/htmlnn";


Content-Type 의 종류.

1) Multipart Related MIME 타입
  - Content-Type: Multipart/related <-- 기본형태
  - Content-Type: Application/X-FixedRecord


2) XML Media의 타입
 - Content-Type: text/xml
 - Content-Type: Application/xml
 - Content-Type: Application/xml-external-parsed-entity
 - Content-Type: Application/xml-dtd
 - Content-Type: Application/mathtml+xml
 - Content-Type: Application/xslt+xml


3) Application의 타입 
 - Content-Type: Application/EDI-X12 <--  Defined in RFC 1767 
 - Content-Type: Application/EDIFACT <--  Defined in RFC 1767 
 - Content-Type: Application/javascript <-- Defined in RFC 4329 
 - Content-Type: Application/octet-stream  : <-- 디폴트 미디어 타입은 운영체제 종종 실행파일, 다운로드를 의미
 - Content-Type: Application/ogg <-- Defined in RFC 3534
 - Content-Type: Application/x-shockwave-flash <-- Adobe Flash files
 - Content-Type: Application/json <-- JavaScript Object Notation JSON; Defined in RFC 4627 
 - Content-Type: Application/x-www-form-urlencode <-- HTML Form 형태

* x-www-form-urlencode와 multipart/form-data은 둘다 폼 형태이지만 x-www-form-urlencode은 대용량 바이너리 테이터를 전송하기에 비능률적이기 때문에 대부분 첨부파일은 multipart/form-data를 사용하게 된다.


4) 오디오 타입
- Content-Type: audio/mpeg <-- MP3 or other MPEG audio
- Content-Type: audio/x-ms-wma <-- Windows Media Audio;
- Content-Type: audio/vnd.rn-realaudio <--  RealAudio;  등등 

5) Multipart 타입
- Content-Type: multipart/mixed: MIME E-mail; 
- Content-Type: multipart/alternative: MIME E-mail;
- Content-Type: multipart/related: MIME E-mail <-- Defined in RFC 2387 and used by MHTML(HTML mail) 
- Content-Type: multipart/formed-data  <-- 파일 첨부


6) TEXT 타입 
- Content-Type: text/css
- Content-Type: text/html
- Content-Type: text/javascript
- Content-Type: text/plain
- Content-Type: text/xml


좀더 다양한 포맷에 대해서는 아래의 URL을 참고하기 바랍니다.

번호 제목 글쓴이 날짜 조회 수
166 XMLHttpRequest.setRequestHeader 황제낙엽 2013.09.30 407
» HTTP Content-Type 정리 황제낙엽 2013.09.30 431
164 getBoundingClientRect in FF3 file 황제낙엽 2013.01.11 409
163 연속해서 스트림 받기 (flush data from servlet to jsp with ajax) 황제낙엽 2013.01.04 2815
162 Stack (스택) 예제 프로그램 황제낙엽 2012.12.27 387
161 상속과 Super 로의 접근 황제낙엽 2012.09.18 380
160 inherits() 를 이용한 상속 황제낙엽 2012.07.18 412
159 Javascript delete 황제낙엽 2012.06.11 421
158 delete 연산자에 대한 고찰 황제낙엽 2012.06.11 438
157 자바스크립트의 쉬프트 연산자 (Shift Operator) 와 음수 (Negative) 이야기 황제낙엽 2012.05.31 1052
156 연산자 (===, ==, >=, <=) 황제낙엽 2012.05.30 391
155 XMLHttpRequest 의 이벤트 onreadystatechange 황제낙엽 2012.05.30 673
154 JavaScript 재입문 황제낙엽 2012.05.29 373
153 진행 상황 추적하기(XMLHttpRequest.readyState) file 황제낙엽 2012.05.23 637
152 JavaScript Touch and Gesture Events iPhone and Android 황제낙엽 2012.04.12 750
151 Javascript ArrayBuffer ? Binary handling in javascript 황제낙엽 2012.03.19 724
150 오류:호출자(서버 응용 프로그램이 아닌 서버)가 사용될 수 없어서 사라졌습니다. file 황제낙엽 2012.03.14 2190
149 Alert 에서의 개행처리 황제낙엽 2012.03.09 397
148 env.js 사용시 부족한 부분 file 황제낙엽 2012.02.15 334
147 Rhino 와 env.js 를 사용해서 자바 서버에서 javascript 를 구동해보자 file 황제낙엽 2012.02.15 398