Response.ContentType所有类型说明
ASP Response对象属性
ASP Response 对象属性Response 对象也提供一系列的属性,可以读取和修改,使服务器端的响应能够适应客户端的请求,这些属性通常由服务器设置。
1.Buffer 属性该属性用于指示是否是缓冲页输出,Buffer 属性的语法格式如下:其中,Flag 值为布尔类型数据。
若当Flag 为FALSE 时候,服务器在处理脚本的同时将输出发送给客户端;当Flag 为TRUE 时候,服务器端Response 的内容先写入缓冲区,脚本处理完后再将结果全部传递给用户。
Buffer 属性的默认值为FAL SE 。
设置Buffer 属性为TRUE 时,如果在中途调用了Response 对象的Flush 或者End 方法则立即将已经处理的数据输出。
2.CacheControl 属性该属性指定了一个脚本生成的页面是否可以由代理服务器缓存。
为这个属性分配的选项,可以是字符串Public 或者是Private 。
启用脚本生成页面的缓存和禁止页面缓存,可分别使用如下代码:该属性将字符集名称附加到Response 对象中的Content-type 标题的后面,用来例如:4.ContentType 属性ContentType 属性用来指定响应的HTTP 内容类型。
如果未指定,则默认是text 一般来说,ContentType 都以“类型/子类型”的字符串来表示,通常有text/HTML、image/GIF、image/JPEG、text/plain等。
5.Expires属性该属性指定浏览器上缓冲存储的页,还有多少时间过期。
如果用户在某个页过期之前又回到此页,就会显示缓冲区中的版本。
这种设置有助于数据的保密。
6.ExpiresAbsolute属性该属性指定缓存于浏览器中的页的到期日期和时间。
在未到期之前,若用户返回到该页,该缓存就显示;如果未指定时间,该主页当天午夜到期;如果未指定日期,则该主页在脚本运行当天的指定时间到期。
c#二进制图片存储与读取
if (mydr.Read())
{
Response.ContentType = imgtype;
Response.BinaryWrite((byte[])mydr[ "img "]);
}
else
1.switch (dataread("document_type"))
2. {
3. case "doc":
4. Response.ContentType = "application/msword";
5. case "swf":
6. Response.ContentType = "application/x-shockwave-flash";
.NET二进制图片存储与读取的常见方法有以下几种:
.NET二进制图片存储:以二进制的形式存储图片时,要把数据库中的字段设置为Image数据类型(SQL Server),存储的数据是Byte[].
1.参数是图片路径:返回Byte[]类型:
1.public byte[] GetPictureData(string imagepath)
myconn.Open();
string str= "insert into image (img) values( ' " + bytes + " ') ";
SqlCommand mycomm = new SqlCommand(str, myconn);
常见的Content-Type类型
常见的Content-Type类型<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link href="https:///twitter-bootstrap/4.3.1/css/bootstrap.css" rel="stylesheet"><title>Content-Type说明</title> </head> <body> <div class=" container"> <h4 class="text-primary">MediaType,即是Internet Media Type,互联⽹媒体类型;也叫做MIME类型,在Http协议消息头中,使⽤Content-Type来表⽰具体请求中的媒体类型信息。
</h4> <p>常见的媒体格式类型如下</p> <ul class=" text-danger"> <li>text/html:HTML格式</li> <li>text/plain:纯⽂本格式</li> <li>text/xml:XML格式</li><li>image/gif:gif图⽚格式</li> <li>image/jpeg:jpg图⽚格式</li> <li>image/png:png图⽚格式</li> </ul> <p>以application开头的媒体格式类型:</p> <ul class="text-danger"> <li>application/xhtml+xml:XHTML格式</li> <li>application/xml:XML数据格式</li><li>application/atom+xml:Atom XML聚合格式</li> <li>application/json:JSON数据格式</li> <li>application/pdf:pdf格式</li><li>application/msword:Word⽂档格式</li> <li>application/octet-stream:⼆进制流数据(常见的⽂件下载)</li> <li>application/x-www-form-urlencoded:表单中默认的encType,表单数据被编码为key/value格式发送到服务器</li> </ul> <p>另外⼀种常见的媒体格式是上传⽂件时使⽤:</p> <ul class="text-danger"> <li>multipart/form-data:需要在表单中进⾏⽂件上传时,就需要使⽤该格式</li> </ul> <p>C#中的HttpClient如何设置这些Content-Type,可看下这篇:</p> <a href="https:///zzr-stdio/p/10165539.html">HttpClient的Content-Type设置</a> </div> </body>。
Response.ContentType详细列表
Response.ContentType详细列表不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是⽹页格式.代码如:<% response.ContentType ="text/html" %><!--#i nclude virtual="/ContentType.html" -->显⽰的为⽹页,⽽<% response.ContentType ="text/plain" %><!--#i nclude virtual="/sscript/ContentType.html" -->则会显⽰html原代码.以下为⼀些常⽤的 ContentTypeGIF images<% response.ContentType ="image/gif" %><!--#i nclude virtual="/myimage.gif" -->JPEG images<% response.ContentType ="image/jpeg" %><!--#i nclude virtual="/myimage.jpeg" -->TIFF images<% response.ContentType ="image/tiff" %><!--#i nclude virtual="/myimage.tiff" -->MICROSOFT WORD document<% response.ContentType ="application/msword" %><!--#i nclude virtual="/myfile.doc" -->RTF document<% response.ContentType ="application/rtf" %><!--#i nclude virtual="/myfile.rtf" -->MICROSOFT EXCEL document<% response.ContentType ="application/x-excel" %><!--#i nclude virtual="/myfile.xls" -->MICROSOFT POWERPOINT document<% response.ContentType ="application/ms-powerpoint" %><!--#i nclude virtual="/myfile.pff" -->PDF document<% response.ContentType ="application/pdf" %><!--#i nclude virtual="/myfile.pdf" -->ZIP document<% response.ContentType ="application/zip" %><!--#i nclude virtual="/myfile.zip" -->下⾯是更详细的ContentType'ez' => 'application/andrew-inset','hqx' => 'application/mac-binhex40','cpt' => 'application/mac-compactpro','doc' => 'application/msword','bin' => 'application/octet-stream','dms' => 'application/octet-stream','lha' => 'application/octet-stream','lzh' => 'application/octet-stream','exe' => 'application/octet-stream','class' => 'application/octet-stream','so' => 'application/octet-stream','dll' => 'application/octet-stream','oda' => 'application/oda','pdf' => 'application/pdf','eps' => 'application/postscript','ps' => 'application/postscript','smi' => 'application/smil','smil' => 'application/smil','mif' => 'application/vnd.mif','xls' => 'application/vnd.ms-excel','ppt' => 'application/vnd.ms-powerpoint','wbxml' => 'application/vnd.wap.wbxml','wmlc' => 'application/vnd.wap.wmlc','wmlsc' => 'application/vnd.wap.wmlscriptc', 'bcpio' => 'application/x-bcpio','vcd' => 'application/x-cdlink','pgn' => 'application/x-chess-pgn','cpio' => 'application/x-cpio','csh' => 'application/x-csh','dcr' => 'application/x-director','dir' => 'application/x-director','dxr' => 'application/x-director','dvi' => 'application/x-dvi','spl' => 'application/x-futuresplash','gtar' => 'application/x-gtar','hdf' => 'application/x-hdf','js' => 'application/x-javascript','skp' => 'application/x-koan','skd' => 'application/x-koan','skt' => 'application/x-koan','skm' => 'application/x-koan','latex' => 'application/x-latex','nc' => 'application/x-netcdf','cdf' => 'application/x-netcdf','sh' => 'application/x-sh','shar' => 'application/x-shar','swf' => 'application/x-shockwave-flash','sit' => 'application/x-stuffit','sv4cpio' => 'application/x-sv4cpio','sv4crc' => 'application/x-sv4crc','tar' => 'application/x-tar','tcl' => 'application/x-tcl','tex' => 'application/x-tex','texinfo' => 'application/x-texinfo','texi' => 'application/x-texinfo','t' => 'application/x-troff','tr' => 'application/x-troff','roff' => 'application/x-troff','man' => 'application/x-troff-man','me' => 'application/x-troff-me','ms' => 'application/x-troff-ms','ustar' => 'application/x-ustar','src' => 'application/x-wais-source','xhtml' => 'application/xhtml+xml','xht' => 'application/xhtml+xml','zip' => 'application/zip','au' => 'audio/basic','snd' => 'audio/basic','mid' => 'audio/midi','midi' => 'audio/midi','kar' => 'audio/midi','mpga' => 'audio/mpeg','mp2' => 'audio/mpeg','mp3' => 'audio/mpeg','aif' => 'audio/x-aiff','aiff' => 'audio/x-aiff','aifc' => 'audio/x-aiff','m3u' => 'audio/x-mpegurl','ram' => 'audio/x-pn-realaudio','rm' => 'audio/x-pn-realaudio','rpm' => 'audio/x-pn-realaudio-plugin','wav' => 'audio/x-wav','pdb' => 'chemical/x-pdb','xyz' => 'chemical/x-xyz','bmp' => 'image/bmp','gif' => 'image/gif','ief' => 'image/ief','jpeg' => 'image/jpeg','jpg' => 'image/jpeg','jpe' => 'image/jpeg','png' => 'image/png','tiff' => 'image/tiff','tif' => 'image/tiff','djvu' => 'image/vnd.djvu','djv' => 'image/vnd.djvu','wbmp' => 'image/vnd.wap.wbmp', 'ras' => 'image/x-cmu-raster','pnm' => 'image/x-portable-anymap', 'pbm' => 'image/x-portable-bitmap', 'pgm' => 'image/x-portable-graymap', 'ppm' => 'image/x-portable-pixmap', 'rgb' => 'image/x-rgb','xbm' => 'image/x-xbitmap','xpm' => 'image/x-xpixmap','xwd' => 'image/x-xwindowdump','igs' => 'model/iges','iges' => 'model/iges','msh' => 'model/mesh','mesh' => 'model/mesh','silo' => 'model/mesh','wrl' => 'model/vrml','vrml' => 'model/vrml','css' => 'text/css','html' => 'text/html','htm' => 'text/html','asc' => 'text/plain','txt' => 'text/plain','rtx' => 'text/richtext','rtf' => 'text/rtf','sgml' => 'text/sgml','sgm' => 'text/sgml','tsv' => 'text/tab-separated-values', 'wml' => 'text/vnd.wap.wml','wmls' => 'text/vnd.wap.wmlscript', 'etx' => 'text/x-setext','xsl' => 'text/xml','xml' => 'text/xml','mpeg' => 'video/mpeg','mpg' => 'video/mpeg','mpe' => 'video/mpeg','qt' => 'video/quicktime','mov' => 'video/quicktime','mxu' => 'video/vnd.mpegurl','avi' => 'video/x-msvideo','movie' => 'video/x-sgi-movie','ice' => 'x-conference/x-cooltalk'。
Response.ContentType所有类型例举
Response.ContentType所有类型例举一、Response.ContentType 类型简介一简单用法服务器送给客户端的数据包类型可以是text/html文本,也可以是gif/jpeg图形文件,所以每次传输前,我们都必须告知客户端将要传输的文件类型,一般默认情况下为“Text/Html”类型。
常用的类型包括:<% Response.ContentType = "text/HTML" %><% Response.ContentType = "image/GIF" %><% Response.ContentType = "image/JPEG" %><% Response.ContentType = "text/plain" %><% Response.ContentType = "image/JPEG" %><% Response.ContentType = "application/x-cdf" %>用于作为文本内容返回而不是已解释的HTML 语句:Response.ContentType = "text/plain"<% Response.ContentType = "text/plain"Response.write(now()&"会被执行么?")%>你可以注意到:页面提供下载,页面中的ASP内容被解释执行了的程序文件以XLS文件被提供下载Response.ContentType = "application/vnd.ms-excel"<% Response.ContentType = "application/vnd.ms-excel"Response.write("本页面调试会出现下载对话框提供下载,保存类型为XLS")%>实现歌曲连续播放response.ContentType="audio/x-pn-realaudio"<% dim ramstrramstr=""set rs=server.createobject("adodb.recordset")sql="XXXXXXXXXXX"rs.open sql,conn,1,3 ‘conn已定义do while not rs.eoframstr=ramstr&rs("url")&vbCrLfrs.movenextlooprs.closeresponse.ContentType="audio/x-pn-realaudio"‘response.ContentType="audio/x-mpegurl"response.write ramstr%>response.write 输出的时候,由于定义了response.ContentType 所以输出歌曲地址的时候会自动调用符合相应格式的软件来播放歌曲,不过前提是播放歌曲的软件必须先安装的。
请求体中content-type作用
请求体中content-type作用-概述说明以及解释1.引言概述部分的内容可以如下所示:1.1 概述请求体(request body)是HTTP请求中的一部分,用于向服务器传递数据。
在客户端发送HTTP请求时,请求体包含着要发送的数据。
这些数据可以是表单数据、JSON、XML、文件等,通过请求体传递给服务器。
在发送请求时,需要使用Content-Type头字段来标识请求体的类型。
Content-Type是一个HTTP头字段,用于描述请求或响应体的媒体类型。
它告诉服务器接收到的数据是什么类型的,并根据该类型进行相应的处理和解析。
Content-Type的作用非常重要,它决定了服务器如何处理请求体中的数据。
不同的Content-Type值会触发服务器不同的处理器或解析器来解析请求体。
例如,如果Content-Type是application/json,则服务器会使用JSON解析器来解析请求体中的数据;如果Content-Type是multipart/form-data,则服务器会使用适当的解析器来处理包含在请求体中的表单数据。
了解请求体中Content-Type的作用对于开发者和网络工程师来说至关重要。
正确使用和理解Content-Type可以确保数据在传输过程中得到正确处理,并且减少不必要的错误和问题。
在本文中,我们将探讨请求体的组成以及Content-Type的作用。
我们还将介绍一些常见的Content-Type取值,以及它们在请求和响应过程中对数据的影响。
最后,我们将总结请求体中Content-Type的重要性,并提供一些建议来选择合适的Content-Type。
1.2 文章结构本文共分为三个主要部分:引言、正文和结论。
下面将对每个部分进行详细说明。
1. 引言:在引言部分,将给出整篇文章的背景和概述,引导读者进入正文内容。
首先会简单介绍请求体的概念和组成,并解释请求体在网络通信中的作用。
接着会提出本文的目的,即探讨请求体中Content-Type的作用。
HTTP响应类型ContentType对照表
HTTP响应类型ContentType对照表Ø前⾔1.下⾯是 HTTP 响应类型 ContentType 的可选值,有备⽆患先保存⼀下。
摘⾃:。
2.以 C# 为例设置如下:1): HttpContext.Current.Response.contentType = "application/vnd.ms-excel";2)WEB API: httpResponseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("text/comma-separated-values");Ø表格如下:MIME-Typ Dateiendung(en)Bedeutungapplication/acad*.dwg AutoCAD-Dateien (nach NCSA)application/applefile AppleFile-Dateienapplication/astound*.asd *.asn Astound-Dateienapplication/dsptype*.tsp TSP-Dateienapplication/dxf*.dxf AutoCAD-Dateien (nach CERN)application/futuresplash*.spl Flash Futuresplash-Dateienapplication/gzip*.gz GNU Zip-Dateienapplication/javascript*.js serverseitige JavaScript-Dateienapplication/json*.jsonapplication/listenup*.ptlk Listenup-Dateienapplication/mac-binhex40*.hqx Macintosh Binärdateienapplication/mbedlet*.mbd Mbedlet-Dateienapplication/mif*.mif FrameMaker InterchangeFormat Dateienapplication/msexcel*.xls *.xla Microsoft Excel Dateienapplication/mshelp*.hlp *.chm Microsoft Windows Hilfe Dateienapplication/mspowerpoint*.ppt *.ppz *.pps *.pot Microsoft Powerpoint Dateienapplication/msword*.doc *.dot Microsoft Word Dateienapplication/octet-stream*.bin *.exe *.com *.dll *.class Nicht näher spezifizierte D aten, z.B. ausführbare Dat eienapplication/oda*.oda Oda-Dateien application/pdf*.pdf PDF-Dateien application/postscript*.ai *.eps *.ps PostScript-Dateien application/rtc*.rtc RTC-Dateien application/rtf*.rtf RTF-Dateien application/studiom*.smp Studiom-Dateien application/toolbook*.tbk Toolbook-Dateien application/vocaltec-media-desc*.vmd Vocaltec Mediadesc-Dateienapplication/vocaltec-media-file*.vmf Vocaltec Media-Dateien application/*.xlsx Excel (OpenOffice Calc) vnd.openxmlformats-officedocument. spreadsheetml.sheetapplication/*.docx Word (OpenOffice Writer) vnd.openxmlformats-officedocument.wordprocessingml.documentapplication/xhtml+xml*.htm *.html *.shtml *.xhtml XHTML-Dateien application/xml*.xml XML-Dateien application/x-bcpio*.bcpio BCPIO-Dateien application/x-compress*.z zlib-komprimierte Dateien application/x-cpio*.cpio CPIO-Dateien application/x-csh*.csh C-Shellscript-Dateien application/x-director*.dcr *.dir *.dxr Macromedia Director-Dateienapplication/x-dvi*.dvi DVI-Dateienapplication/x-dvi*.dvi DVI-Dateienapplication/x-envoy*.evy Envoy-Dateien application/x-gtar*.gtar GNU tar-Archivdateien application/x-hdf*.hdf HDF-Dateien application/x-httpd-php*.php *.phtml PHP-Dateien application/x-latex*.latex LaTeX-Quelldateien application/x-macbinary*.bin Macintosh Binärdateien application/x-mif*.mif FrameMaker InterchangeFormat Dateien application/x-netcdf*.nc *.cdf Unidata CDF-Dateien application/x-nschat*.nsc NS Chat-Dateien application/x-sh*.sh Bourne Shellscript-Dateien application/x-shar*.shar Shell-Archivdateien application/x-shockwave-flash*.swf *.cab Flash Shockwave-Dateien application/x-sprite*.spr *.sprite Sprite-Dateien application/x-stuffit*.sit Stuffit-Dateien application/x-supercard*.sca Supercard-Dateien application/x-sv4cpio*.sv4cpio CPIO-Dateien application/x-sv4crc*.sv4crc CPIO-Dateien mit CRC application/x-tar*.tar tar-Archivdateien application/x-tcl*.tcl TCL Scriptdateien application/x-tex*.tex TeX-Dateien application/x-texinfo*.texinfo *.texi Texinfo-Dateien application/x-troff*.t *.tr *.roff TROFF-Dateien (Unix) application/x-troff-man*.man *.troff TROFF-Dateien mit MAN-Makros (Unix) application/x-troff-me*.me *.troff TROFF-Dateien mit ME-Makros (Unix)application/x-troff-ms*.me *.troff TROFF-Dateien mit MS-Makros (Unix)application/x-ustar*.ustar tar-Archivdateien (Posix) application/x-wais-source*.src WAIS Quelldateienapplication/x-www-form-urlencod ed HTML-Formulardaten anCGIapplication/zip*.zip ZIP-Archivdateienaudio/basic*.au *.snd Sound-Dateienaudio/echospeech*.es Echospeed-Dateien audio/tsplayer*.tsi TS-Player-Dateienaudio/voxware*.vox Vox-Dateienaudio/x-aiff*.aif *.aiff *.aifc AIFF-Sound-Dateien audio/x-dspeeh*.dus *.cht Sprachdateienaudio/x-midi*.mid *.midi MIDI-Dateienaudio/x-mpeg*.mp2MPEG-Audiodateien audio/x-pn-realaudio*.ram *.ra RealAudio-Dateienaudio/x-pn-realaudio-plugin*.rpm RealAudio-Plugin-Dateien audio/x-qt-stream*.stream Quicktime-Streaming-Dateienaudio/x-wav*.wav WAV-Dateiendrawing/x-dwf*.dwf Drawing-Dateienimage/cis-cod*.cod CIS-Cod-Dateienimage/cmu-raster*.ras CMU-Raster-Dateien image/fif*.fif FIF-Dateienimage/gif*.gif GIF-Dateienimage/ief*.ief IEF-Dateienimage/jpeg*.jpeg *.jpg *.jpe JPEG-Dateienimage/png*.png PNG-Dateienimage/tiff*.tiff *.tif TIFF-Dateienimage/vasa*.mcf Vasa-Dateienimage/vnd.wap.wbmp*.wbmp Bitmap-Dateien (WAP) image/x-freehand*.fh4 *.fh5 *.fhc Freehand-Dateienimage/x-freehand*.fh4 *.fh5 *.fhc Freehand-Dateienimage/x-icon*.ico Icon-Dateien (z.B. Favoriten-Icons)image/x-portable-anymap*.pnm PBM Anymap Dateien image/x-portable-bitmap*.pbm PBM Bitmap Dateien image/x-portable-graymap*.pgm PBM Graymap Dateien image/x-portable-pixmap*.ppm PBM Pixmap Dateien image/x-rgb*.rgb RGB-Dateienimage/x-windowdump*.xwd X-Windows Dumpimage/x-xbitmap*.xbm XBM-Dateienimage/x-xpixmap*.xpm XPM-Dateienmessage/external-body Nachricht mit externem Inhaltmessage/http HTTP-Headernachricht message/news Newsgroup-Nachricht message/partial Nachricht mit Teilinhalt message/rfc822 Nachricht nach RFC (2)822model/vrml*.wrl Visualisierung virtueller Welten (VRML)multipart/alternative mehrteilige Daten; jeder Teil ist eine zu den anderengleichwertige Alternative multipart/byteranges mehrteilige Daten mit Byte-Angabenmultipart/digest mehrteilige Daten / Auswahlmultipart/encrypted mehrteilige Daten verschlüsseltmultipart/form-data mehrteilige Daten aus HTML-Formular (z.B. File-Upload)multipart/mixed mehrteilige Daten ohne Bezug der Teile untereinandermultipart/parallel mehrteilige Daten parallel multipart/related mehrteilige Daten mit Abhängigkeiten der Teile voneinandermultipart/report mehrteilige Daten / Bericht multipart/signed mehrteilige Daten / bezeichnetmultipart/voice-message mehrteilige Daten / Sprachnachrichttext/comma-separated-values*.csv kommaseparierte Datendateientext/css*.css CSS Stylesheet-Dateien text/html*.htm *.html *.shtml HTML-Dateientext/javascript*.js JavaScript-Dateientext/plain*.txt reine Textdateientext/richtext*.rtx Richtext-Dateientext/rtf*.rtf RTF-Dateientext/tab-separated-values*.tsv tabulator-separierte Datendateientext/vnd.wap.wml*.wml WML-Dateien (WAP) application/vnd.wap.wmlc*.wmlc WMLC-Dateien (WAP) text/vnd.wap.wmlscript*.wmls WML-Scriptdateien (WAP) application/vnd.wap.wmlscriptc*.wmlsc WML-Script-C-dateien (WAP)text/xml*.xml XML-Dateientext/xml-external-parsed-entity extern geparste XML-Dateientext/x-setext*.etx SeText-Dateientext/x-sgml*.sgm *.sgml SGML-Dateientext/x-speech*.talk *.spc Speech-Dateienvideo/mpeg*.mpeg *.mpg *.mpe MPEG-Videodateien video/quicktime*.qt *.mov Quicktime-Dateienvideo/vnd.vivo*.viv *.vivo Vivo-Dateienvideo/x-msvideo*.avi Microsoft AVI-Dateien video/x-sgi-movie*.movie Movie-Dateienworkbook/formulaone*.vts *.vtts FormulaOne-Dateienx-world/x-3dmf*.3dmf *.3dm *.qd3d *.qd33DMF-Dateienx-world/x-vrml*.wrl Visualisierung virtueller Welten (VRML) (veralteter MIME-Typ, aktuell ist model/vrml)。
response.setContentType()参数以及作用详解
response.setContentType()参数以及作⽤详解response.setContentType(MIME)的作⽤是使客户端浏览器,区分不同种类的数据,并根据不同的MIME调⽤浏览器内不同的程序嵌⼊模块来处理相应的数据。
例如web浏览器就是通过MIME类型来判断⽂件是GIF图⽚。
通过MIME类型来处理json字符串。
Tomcat的安装⽬录\conf\web.xml 中就定义了⼤量MIME类型,可以参考。
response.setContentType("text/html; charset=utf-8"); html.setContentType("text/plain; charset=utf-8"); ⽂本text/javascript json数据application/xml xml数据这个⽅法设置发送到客户端的响应的内容类型,此时响应还没有提交。
给出的内容类型可以包括字符编码说明,例如:text/html;charset=UTF-8.如果该⽅法在getWriter()⽅法被调⽤之前调⽤,那么响应的字符编码将仅从给出的内容类型中设置。
该⽅法如果在getWriter()⽅法被调⽤之后或者在被提交之后调⽤,将不会设置响应的字符编码,在使⽤http协议的情况中,该⽅法设置 Content-type实体报头。
⼀般在Servlet中,习惯性的会⾸先设置请求以及响应的内容类型以及编码⽅式:response.setContentType("text/html;charset=UTF-8");request.setCharacterEncoding("UTF-8");response.setContentType()的String参数及对应类型⽂件扩展名Content-Type(Mime-Type)⽂件扩展名Content-Type(Mime-Type).*(⼆进制流,不知道下载⽂件类型)application/octet-stream.tif image/tiff.001application/x-001.301application/x-301.323text/h323.906application/x-906.907drawing/907.a11application/x-a11.acp audio/x-mei-aac.ai application/postscript.aif audio/aiff.aifc audio/aiff.aiff audio/aiff.anv application/x-anv.asa text/asa.asf video/x-ms-asf.asp text/asp.asx video/x-ms-asf.au audio/basic.avi video/avi.awf application/ text/xml.bmp application/x-bmp.bot application/x-bot.c4t application/x-c4t.c90application/x-c90.cal application/x-cals.cat application/vnd.ms-pki.seccat .cdf application/x-netcdf.cdr application/x-cdr.cel application/x-cel.cer application/x-x509-ca-cert.cg4application/x-g4.cgm application/x-cgm.cit application/x-cit.class java/*.cml text/xml.cmp application/x-cmp.cmx application/x-cmx.cot application/x-cot.crl application/pkix-crl.crt application/x-x509-ca-cert.csi application/x-csi.css text/css.cut application/x-cut.dbf application/x-dbf.dbm application/x-dbm.dbx application/x-dbx.dcd text/xml.dcx application/x-dcx.der application/x-x509-ca-cert.dgn application/x-dgn.dib application/x-dib.dll application/x-msdownload.doc application/msword.dot application/msword.drw application/x-drw.dtd text/xml.dwf Model/vnd.dwf.dwf application/x-dwf.dwg application/x-dwg.dxb application/x-dxb.dxf application/x-dxf.edn application/vnd.adobe.edn.emf application/x-emf.eml message/rfc822.ent text/xml.epi application/x-epi.eps application/x-ps.eps application/postscript.etd application/x-ebx.exe application/x-msdownload .fax image/fax.fdf application/vnd.fdf.fif application/fractals.fo text/xml.frm application/x-frm.g4application/x-g4.gbr application/x-gbr.application/x-.gif image/gif.gl2application/x-gl2.gp4application/x-gp4.hgl application/x-hgl.hmr application/x-hmr.hpg application/x-hpgl.hpl application/x-hpl.hqx application/mac-binhex40 .hrf application/x-hrf.hta application/hta.htc text/x-component.htm text/html.html text/html.htt text/webviewhtml.htx text/html.icb application/x-icb.ico image/x-icon.ico application/x-ico.iff application/x-iff.ig4application/x-g4.igs application/x-igs.iii application/x-iphone.img application/x-img.ins application/x-internet-signup .isp application/x-internet-signup.IVF video/x-ivf.java java/*.jfif image/jpeg.jpe image/jpeg.jpe application/x-jpe.jpeg image/jpeg.jpg image/jpeg.jpg application/x-jpg.js application/x-javascript.jsp text/1audio/x-liquid-file.lar application/tex application/x-latex.lavs audio/x-liquid-secure.lbm application/x-lbm.lmsff audio/x-la-lms.ls application/x-javascript.ltr application/x-ltr.m1v video/x-mpeg.m2v video/x-mpeg.m3u audio/mpegurl.m4e video/mpeg4.mac application/x-mac.man application/x-troff-man.math text/xml.mdb application/msaccess.mdb application/x-mdb.mfp application/x-shockwave-flash.mht message/rfc822.mhtml message/rfc822.mi application/x-mi.mid audio/mid.midi audio/mid.mil application/x-mil.mml text/xml.mnd audio/x-musicnet-download.mns audio/x-musicnet-stream.mocha application/x-javascript.movie video/x-sgi-movie.mp1audio/mp1.mp2audio/mp2.mp2v video/mpeg.mp3audio/mp3.mp4video/mpeg4.mpa video/x-mpg.mpd application/vnd.ms-project.mpe video/x-mpeg.mpeg video/mpg.mpg video/mpg.mpga audio/rn-mpeg.mpp application/vnd.ms-project .mps video/x-mpeg.mpt application/vnd.ms-project .mpv video/mpg.mpv2video/mpeg.mpw application/vnd.ms-project.mpx application/vnd.ms-project .mtx text/xml.mxp application/x-mmxp.net image/pnetvue.nrf application/x-nrf.nws message/rfc822.odc text/x-ms-odc.out application/x-out.p10application/pkcs10.p12application/x-pkcs12.p7b application/x-pkcs7-certificates .p7c application/pkcs7-mime.p7m application/pkcs7-mime.p7r application/x-pkcs7-certreqresp.p7s application/pkcs7-signature.pc5application/x-pc5.pci application/x-pci.pcl application/x-pcl.pcx application/x-pcx.pdf application/pdf.pdf application/pdf.pdx application/vnd.adobe.pdx.pfx application/x-pkcs12.pgl application/x-pgl.pic application/x-pic.pko application/vnd.ms-pki.pko.pl application/x-perl.plg text/html.pls audio/scpls.plt application/x-plt.png image/png.png application/x-png.pot application/vnd.ms-powerpoint .ppa application/vnd.ms-powerpoint.ppm application/x-ppm.pps application/vnd.ms-powerpoint.ppt application/vnd.ms-powerpoint .ppt application/x-ppt.pr application/x-pr.prf application/pics-rules.prn application/x-prn.prt application/x-prt.ps application/x-ps.ps application/postscript.ptn application/x-ptn.pwz application/vnd.ms-powerpoint.r3t text/vnd.rn-realtext3d.ra audio/vnd.rn-realaudio.ram audio/x-pn-realaudio.ras application/x-ras.rat application/rat-file.rdf text/xml.rec application/vnd.rn-recording.red application/x-red.rgb application/x-rgb.rjs application/vnd.rn-realsystem-rjs.rjt application/vnd.rn-realsystem-rjt .rlc application/x-rlc.rle application/x-rle.rm application/vnd.rn-realmedia.rmf application/vnd.adobe.rmf.rmi audio/mid.rmj application/vnd.rn-realsystem-rmj.rmm audio/x-pn-realaudio.rmp application/vnd.rn-rn_music_package.rms application/vnd.rn-realmedia-secure.rmvb application/vnd.rn-realmedia-vbr .rmx application/vnd.rn-realsystem-rmx.rnx application/vnd.rn-realplayer.rp image/vnd.rn-realpix.rpm audio/x-pn-realaudio-plugin.rsml application/vnd.rn-rsml.rt text/vnd.rn-realtext.rtf application/msword.rtf application/x-rtf.rv video/vnd.rn-realvideo.sam application/x-sam.sat application/x-sat.sdp application/sdp.sdw application/x-sdw.sit application/x-stuffit.slb application/x-slb.sld application/x-sld.slk drawing/x-slk.smi application/smil.smil application/smil.smk application/x-smk.snd audio/basic.sol text/plain.sor text/plain.spc application/x-pkcs7-certificates .spl application/futuresplash.spp text/xml.ssm application/streamingmedia.sst application/vnd.ms-pki.certstore .stl application/vnd.ms-pki.stl.stm text/html.sty application/x-sty.svg text/xml.swf application/x-shockwave-flash.tdf application/x-tdf.tg4application/x-tg4.tga application/x-tga.tif image/tiff.tif application/x-tif.tiff image/tiff.tld text/xml.top drawing/x-top.torrent application/x-bittorrent.tsd text/xml.txt text/plain.uin application/x-icq.uls text/iuls.vcf text/x-vcard.vda application/x-vda.vdx application/vnd.visio.vml text/xml.vpg application/x-vpeg005.vsd application/vnd.visio.vsd application/x-vsd.vss application/vnd.visio.vst application/vnd.visio.vst application/x-vst.vsw application/vnd.visio.vsx application/vnd.visio.vtx application/vnd.visio.vxml text/xml.wav audio/wav.wax audio/x-ms-wax.wb1application/x-wb1.wb2application/x-wb2.wb3application/x-wb3.wbmp image/vnd.wap.wbmp.wiz application/msword.wk3application/x-wk3.wk4application/x-wk4.wkq application/x-wkq.wks application/x-wks.wm video/x-ms-wm.wma audio/x-ms-wma.wmd application/x-ms-wmd.wmf application/x-wmf.wml text/vnd.wap.wml.wmv video/x-ms-wmv.wmx video/x-ms-wmx.wmz application/x-ms-wmz.wp6application/x-wp6.wpd application/x-wpd.wpg application/x-wpg.wpl application/vnd.ms-wpl.wq1application/x-wq1.wr1application/x-wr1.wri application/x-wri.wrk application/x-wrk.ws application/x-ws.ws2application/x-ws.wsc text/scriptlet.wsdl text/xml.wvx video/x-ms-wvx.xdp application/vnd.adobe.xdp.xdr text/xml.xfd application/vnd.adobe.xfd.xfdf application/vnd.adobe.xfdf.xhtml text/html.xls application/vnd.ms-excel.xls application/x-xls.xlw application/x-xlw.xml text/xml.xpl audio/scpls.xq text/xml.xql text/xml.xquery text/xml.xsd text/xml.xsl text/xml.xslt text/xml.xwd application/x-xwd.x_b application/x-x_b.sis application/vnd.symbian.install.sisx application/vnd.symbian.install .x_t application/x-x_t.ipa application/vnd.iphone.apk application/vnd.android.package-archive.xap application/x-silverlight-app到此这篇关于response.setContentType()参数以及作⽤详解的⽂章就介绍到这了,更多相关response.setContentType()详解内容请搜索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!。
详解Http请求中Content-Type讲解以及在SpringMVC中的应用
详解Http请求中Content-Type讲解以及在SpringMVC中的应⽤详解Http请求中Content-Type讲解以及在Spring MVC中的应⽤引⾔:在Http请求中,我们每天都在使⽤Content-type来指定不同格式的请求信息,但是却很少有⼈去全⾯了解content-type 中允许的值有多少,这⾥将讲解Content-Type的可⽤值,以及在spring MVC中如何使⽤它们来映射请求信息。
1. Content-TypeMediaType,即是Internet Media Type,互联⽹媒体类型;也叫做MIME类型,在Http协议消息头中,使⽤Content-Type来表⽰具体请求中的媒体类型信息。
类型格式:type/subtype(;parameter)? type主类型,任意的字符串,如text,如果是*号代表所有;subtype ⼦类型,任意的字符串,如html,如果是*号代表所有;parameter 可选,⼀些参数,如Accept请求头的q参数, Content-Type的 charset参数。
例如: Content-Type: text/html;charset:utf-8;常见的媒体格式类型如下:1. text/html : HTML格式2. text/plain :纯⽂本格式3. text/xml : XML格式4. image/gif :gif图⽚格式5. image/jpeg :jpg图⽚格式6. image/png:png图⽚格式以application开头的媒体格式类型:1. application/xhtml+xml :XHTML格式2. application/xml : XML数据格式3. application/atom+xml :Atom XML聚合格式4. application/json : JSON数据格式5. application/pdf :pdf格式6. application/msword : Word⽂档格式7. application/octet-stream :⼆进制流数据(如常见的⽂件下载)8. application/x-www-form-urlencoded : <form encType=””>中默认的encType,form表单数据被编码为key/value格式发送到服务器(表单默认的提交数据的格式)另外⼀种常见的媒体格式是上传⽂件之时使⽤的:multipart/form-data :需要在表单中进⾏⽂件上传时,就需要使⽤该格式以上就是我们在⽇常的开发中,经常会⽤到的若⼲content-type的内容格式。
Requect对象和Response对象
Requect对象和Response对象在c#编程中,对Requect对象和Response对象的使用是相当多的,今天我们来看看到底Requect对象和Response对象是什么?网页Requect对象获取服务器封装浏览器请求的对象,利用此对象可以得到请求的主机、ip、参数等信息;response的对象封装了服务器向客户端响应的数据和告诉客户端应该进行什么样的操作,利用response对象可以控制浏览器的缓存、显示、编码等行为。
Requect对象1、Requect对象的定义。
Requect派生自HttpRequect类,主要功能就是从客服端获取信息,包括浏览器的种类、用户输入表单中的数据、Cookies中的数据和客户端认证或者收集服务器端的环境变量。
request对象是从客户端向服务器发出请求,包括用户提交的信息以及客户端的一些信息。
客户端可通过HTML表单或在网页地址后面提供参数的方法提交数据,然后通过request对象的相关方法来获取这些数据。
request的各种方法主要用来处理客户端浏览器提交的请求中的各项参数和选项。
2、Requect对象实例ASP前端页面代码:<%@ Page Language="C#" AutoEventWireup="true"CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="/1999/xhtml"><head runat="server"><title></title></head><body><form id="form1" runat="server"><div>账号:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br />密码:<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <br /><asp:Button ID="Button1" runat="server" Text="提交" /></div></form></body></html>C#后台代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace WebApplication1{public partial class WebForm1 : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e) {}protected void Button1_Click(object sender, EventArgs e) {string name = Request["TextBox1"].ToString();string passw = Request["TextBox2"].ToString();//处理函数。
HTML Response ContentType 大全
".*"="application/octet-stream"".001"="application/x-001"".301"="application/x-301"".323"="text/h323"".906"="application/x-906"".907"="drawing/907"".a11"="application/x-a11"".acp"="audio/x-mei-aac"".ai"="application/postscript"".aif"="audio/aiff"".aifc"="audio/aiff"".aiff"="audio/aiff"".anv"="application/x-anv"".asa"="text/asa"".asf"="video/x-ms-asf"".asp"="text/asp"".asx"="video/x-ms-asf"".au"="audio/basic"".avi"="video/avi"".awf"="application/vnd.adobe.workflow" ".biz"="text/xml"".bmp"="application/x-bmp"".bot"="application/x-bot"".c4t"="application/x-c4t"".c90"="application/x-c90"".cal"="application/x-cals"".cat"="application/vnd.ms-pki.seccat" ".cdf"="application/x-netcdf"".cdr"="application/x-cdr"".cel"="application/x-cel"".cer"="application/x-x509-ca-cert"".cg4"="application/x-g4"".cgm"="application/x-cgm"".cit"="application/x-cit"".class"="java/*"".cml"="text/xml"".cmp"="application/x-cmp"".cmx"="application/x-cmx"".cot"="application/x-cot"".crl"="application/pkix-crl"".crt"="application/x-x509-ca-cert"".csi"="application/x-csi"".css"="text/css"".cut"="application/x-cut"".dbf"="application/x-dbf"".dbm"="application/x-dbm"".dbx"="application/x-dbx"".dcd"="text/xml"".dcx"="application/x-dcx"".der"="application/x-x509-ca-cert" ".dgn"="application/x-dgn"".dib"="application/x-dib"".dll"="application/x-msdownload" ".doc"="application/msword"".dot"="application/msword"".drw"="application/x-drw"".dtd"="text/xml"".dwf"="Model/vnd.dwf"".dwf"="application/x-dwf"".dwg"="application/x-dwg"".dxb"="application/x-dxb"".dxf"="application/x-dxf"".edn"="application/vnd.adobe.edn" ".emf"="application/x-emf"".eml"="message/rfc822"".ent"="text/xml"".epi"="application/x-epi"".eps"="application/x-ps"".eps"="application/postscript" ".etd"="application/x-ebx"".exe"="application/x-msdownload" ".fax"="image/fax"".fdf"="application/vnd.fdf"".fif"="application/fractals"".fo"="text/xml"".frm"="application/x-frm"".g4"="application/x-g4"".gbr"="application/x-gbr"".gcd"="application/x-gcd"".gif"="image/gif"".gl2"="application/x-gl2"".gp4"="application/x-gp4"".hgl"="application/x-hgl"".hmr"="application/x-hmr"".hpl"="application/x-hpl"".hqx"="application/mac-binhex40" ".hrf"="application/x-hrf"".hta"="application/hta"".htc"="text/x-component"".htm"="text/html"".html"="text/html"".htt"="text/webviewhtml"".htx"="text/html"".icb"="application/x-icb"".ico"="image/x-icon"".ico"="application/x-ico"".iff"="application/x-iff"".ig4"="application/x-g4"".igs"="application/x-igs"".iii"="application/x-iphone"".img"="application/x-img"".ins"="application/x-internet-signup" ".isp"="application/x-internet-signup" ".IVF"="video/x-ivf"".java"="java/*"".jfif"="image/jpeg"".jpe"="image/jpeg"".jpe"="application/x-jpe"".jpeg"="image/jpeg"".jpg"="image/jpeg"".jpg"="application/x-jpg"".js"="application/x-javascript"".jsp"="text/html"".la1"="audio/x-liquid-file"".lar"="application/x-laplayer-reg" ".latex"="application/x-latex"".lavs"="audio/x-liquid-secure"".lbm"="application/x-lbm"".lmsff"="audio/x-la-lms"".ls"="application/x-javascript"".ltr"="application/x-ltr"".m1v"="video/x-mpeg"".m2v"="video/x-mpeg"".m3u"="audio/mpegurl"".m4e"="video/mpeg4"".man"="application/x-troff-man"".math"="text/xml"".mdb"="application/msaccess"".mdb"="application/x-mdb"".mfp"="application/x-shockwave-flash" ".mht"="message/rfc822"".mhtml"="message/rfc822"".mi"="application/x-mi"".mid"="audio/mid"".midi"="audio/mid"".mil"="application/x-mil"".mml"="text/xml"".mnd"="audio/x-musicnet-download" ".mns"="audio/x-musicnet-stream" ".mocha"="application/x-javascript" ".movie"="video/x-sgi-movie"".mp1"="audio/mp1"".mp2"="audio/mp2"".mp2v"="video/mpeg"".mp3"="audio/mp3"".mp4"="video/mpeg4"".mpa"="video/x-mpg"".mpd"="application/vnd.ms-project" ".mpe"="video/x-mpeg"".mpeg"="video/mpg"".mpg"="video/mpg"".mpga"="audio/rn-mpeg"".mpp"="application/vnd.ms-project" ".mps"="video/x-mpeg"".mpt"="application/vnd.ms-project" ".mpv"="video/mpg"".mpv2"="video/mpeg"".mpw"="application/vnd.ms-project" ".mpx"="application/vnd.ms-project" ".mtx"="text/xml"".mxp"="application/x-mmxp"".net"="image/pnetvue"".nrf"="application/x-nrf"".nws"="message/rfc822"".odc"="text/x-ms-odc"".out"="application/x-out"".p12"="application/x-pkcs12"".p7b"="application/x-pkcs7-certificates" ".p7c"="application/pkcs7-mime"".p7m"="application/pkcs7-mime"".p7r"="application/x-pkcs7-certreqresp" ".p7s"="application/pkcs7-signature" ".pc5"="application/x-pc5"".pci"="application/x-pci"".pcl"="application/x-pcl"".pcx"="application/x-pcx"".pdf"="application/pdf"".pdf"="application/pdf"".pdx"="application/vnd.adobe.pdx" ".pfx"="application/x-pkcs12"".pgl"="application/x-pgl"".pic"="application/x-pic"".pko"="application/vnd.ms-pki.pko" ".pl"="application/x-perl"".plg"="text/html"".pls"="audio/scpls"".plt"="application/x-plt"".png"="image/png"".png"="application/x-png"".pot"="application/vnd.ms-powerpoint" ".ppa"="application/vnd.ms-powerpoint" ".ppm"="application/x-ppm"".pps"="application/vnd.ms-powerpoint" ".ppt"="application/vnd.ms-powerpoint" ".ppt"="application/x-ppt"".pr"="application/x-pr"".prf"="application/pics-rules"".prn"="application/x-prn"".prt"="application/x-prt"".ps"="application/x-ps"".ps"="application/postscript"".ptn"="application/x-ptn"".pwz"="application/vnd.ms-powerpoint" ".r3t"="text/vnd.rn-realtext3d"".ra"="audio/vnd.rn-realaudio"".ram"="audio/x-pn-realaudio"".ras"="application/x-ras"".rdf"="text/xml"".rec"="application/vnd.rn-recording"".red"="application/x-red"".rgb"="application/x-rgb"".rjs"="application/vnd.rn-realsystem-rjs"".rjt"="application/vnd.rn-realsystem-rjt"".rlc"="application/x-rlc"".rle"="application/x-rle"".rm"="application/vnd.rn-realmedia"".rmf"="application/vnd.adobe.rmf"".rmi"="audio/mid"".rmj"="application/vnd.rn-realsystem-rmj" ".rmm"="audio/x-pn-realaudio"".rmp"="application/vnd.rn-rn_music_package" ".rms"="application/vnd.rn-realmedia-secure" ".rmvb"="application/vnd.rn-realmedia-vbr" ".rmx"="application/vnd.rn-realsystem-rmx" ".rnx"="application/vnd.rn-realplayer"".rp"="image/vnd.rn-realpix"".rpm"="audio/x-pn-realaudio-plugin"".rsml"="application/vnd.rn-rsml"".rt"="text/vnd.rn-realtext"".rtf"="application/msword"".rtf"="application/x-rtf"".rv"="video/vnd.rn-realvideo"".sam"="application/x-sam"".sat"="application/x-sat"".sdp"="application/sdp"".sdw"="application/x-sdw"".sit"="application/x-stuffit"".slb"="application/x-slb"".sld"="application/x-sld"".slk"="drawing/x-slk"".smi"="application/smil"".smil"="application/smil"".smk"="application/x-smk"".snd"="audio/basic"".sol"="text/plain"".sor"="text/plain"".spc"="application/x-pkcs7-certificates"".spl"="application/futuresplash"".spp"="text/xml"".ssm"="application/streamingmedia" ".sst"="application/vnd.ms-pki.certstore" ".stl"="application/vnd.ms-pki.stl"".stm"="text/html"".sty"="application/x-sty"".svg"="text/xml"".swf"="application/x-shockwave-flash" ".tdf"="application/x-tdf"".tg4"="application/x-tg4"".tga"="application/x-tga"".tif"="image/tiff"".tif"="application/x-tif"".tiff"="image/tiff"".tld"="text/xml"".top"="drawing/x-top"".torrent"="application/x-bittorrent" ".tsd"="text/xml"".txt"="text/plain"".uin"="application/x-icq"".uls"="text/iuls"".vcf"="text/x-vcard"".vda"="application/x-vda"".vdx"="application/vnd.visio"".vml"="text/xml"".vpg"="application/x-vpeg005"".vsd"="application/vnd.visio"".vsd"="application/x-vsd"".vss"="application/vnd.visio"".vst"="application/vnd.visio"".vst"="application/x-vst"".vsw"="application/vnd.visio"".vsx"="application/vnd.visio"".vtx"="application/vnd.visio"".vxml"="text/xml"".wav"="audio/wav"".wax"="audio/x-ms-wax"".wb1"="application/x-wb1"".wb2"="application/x-wb2"".wb3"="application/x-wb3"".wbmp"="image/vnd.wap.wbmp"".wiz"="application/msword"".wk4"="application/x-wk4"".wkq"="application/x-wkq"".wks"="application/x-wks"".wm"="video/x-ms-wm"".wma"="audio/x-ms-wma"".wmd"="application/x-ms-wmd" ".wmf"="application/x-wmf"".wml"="text/vnd.wap.wml"".wmv"="video/x-ms-wmv"".wmx"="video/x-ms-wmx"".wmz"="application/x-ms-wmz" ".wp6"="application/x-wp6"".wpd"="application/x-wpd"".wpg"="application/x-wpg"".wpl"="application/vnd.ms-wpl" ".wq1"="application/x-wq1"".wr1"="application/x-wr1"".wri"="application/x-wri"".wrk"="application/x-wrk"".ws"="application/x-ws"".ws2"="application/x-ws"".wsc"="text/scriptlet"".wsdl"="text/xml"".wvx"="video/x-ms-wvx"".xdp"="application/vnd.adobe.xdp" ".xdr"="text/xml"".xfd"="application/vnd.adobe.xfd" ".xfdf"="application/vnd.adobe.xfdf" ".xhtml"="text/html"".xls"="application/vnd.ms-excel" ".xls"="application/x-xls"".xlw"="application/x-xlw"".xml"="text/xml"".xpl"="audio/scpls"".xq"="text/xml"".xql"="text/xml"".xquery"="text/xml"".xsd"="text/xml"".xsl"="text/xml"".xslt"="text/xml"".xwd"="application/x-xwd"".x_t"="application/x-x_t"<! - - ... - -> 批注<!> 跑马灯<marquee>...</marquee>普通卷动<marquee behavior=slide>...</marquee>滑动<marquee behavior=scroll>...</marquee>预设卷动<marquee behavior=alternate>...</marquee>来回卷动<marquee direction=down>...</marquee>向下卷动<marquee direction=up>...</marquee>向上卷动<marquee direction=right></marquee>向右卷动<marquee direction=left></marquee>向左卷动<marquee loop=2>...</marquee>卷动次数<marquee width=180>...</marquee>设定宽度<marquee height=30>...</marquee>设定高度<marquee bgcolor=FF0000>...</marquee>设定背景颜色<marquee scrollamount=30>...</marquee>设定卷动距离<marquee scrolldelay=300>...</marquee>设定卷动时间<!>字体效果<h1>...</h1>标题字(最大)<h6>...</h6>标题字(最小)<b>...</b>粗体字<strong>...</strong>粗体字(强调)<i>...</i>斜体字<em>...</em>斜体字(强调)<dfn>...</dfn>斜体字(表示定义)<u>...</u>底线<ins>...</ins>底线(表示插入文字)<strike>...</strike>横线<s>...</s>删除线<del>...</del>删除线(表示删除)<kbd>...</kbd>键盘文字<tt>...</tt> 打字体<xmp>...</xmp>固定宽度字体(在文件中空白、换行、定位功能有效) <plaintext>...</plaintext>固定宽度字体(不执行标记符号)<listing>...</listing> 固定宽度小字体...字体颜色...最小字体<font style =font-size:100 px>...无限增大<!>区断标记<hr>水平线<hr size=9>水平线(设定大小)<hr width=80%>水平线(设定宽度)<hr color=ff0000>水平线(设定颜色)<br>(换行)<nobr>...</nobr>水域(不换行)<p>...</p>水域(段落)<center>...</center>置中<!>连结格式<base href=地址>(预设好连结路径)<a href=地址>外部连结<a href=地址 target=_blank>外部连结(另开新窗口)<a href=地址 target=_top>外部连结(全窗口连结)<a href=地址 target=页框名>外部连结(在指定页框连结)<!>贴图/音乐<img src=图片地址>贴图<img src=图片地址 width=180>设定图片宽度<img src=图片地址 height=30>设定图片高度<img src=图片地址 alt=提示文字>设定图片提示文字<img src=图片地址 border=1>设定图片边框<bgsound src=MID音乐文件地址>背景音乐设定<!>表格语法<table aling=left>...</table>表格位置,置左<table aling=center>...</table>表格位置,置中<table background=图片路径>...</table>背景图片的URL=就是路径网址<table border=边框大小>...</table>设定表格边框大小(使用数字)<table bgcolor=颜色码>...</table>设定表格的背景颜色<table borderclor=颜色码>...</table>设定表格边框的颜色<table borderclordark=颜色码>...</table>设定表格暗边框的颜色<table borderclorlight=颜色码>...</table>设定表格亮边框的颜色<table cellpadding=参数>...</table>指定内容与网格线之间的间距(使用数字) <table cellspacing=参数>...</table>指定网格线与网格线之间的距离(使用数字) <table cols=参数>...</table>指定表格的栏数<table frame=参数>...</table>设定表格外框线的显示方式<table width=宽度>...</table>指定表格的宽度大小(使用数字)<table height=高度>...</table>指定表格的高度大小(使用数字)<td colspan=参数>...</td>指定储存格合并栏的栏数(使用数字)<td rowspan=参数>...</td>指定储存格合并列的列数(使用数字)<!>分割窗口<frameset cols="20%,*">左右分割,将左边框架分割大小为20%右边框架的大小浏览器会自动调整<frameset rows="20%,*">上下分割,将上面框架分割大小为20%下面框架的大小浏览器会自动调整<frameset cols="20%,*">分割左右两个框架<frameset cols="20%,*,20%">分割左中右三个框架<分割上下两个框架<frameset rows="20%,*,20%">分割上中下三个框架<! - - ... - -> 批注<A HREF TARGET> 指定超级链接的分割窗口<A HREF=#锚的名称> 指定锚名称的超级链接<A HREF> 指定超级链接<A NAME=锚的名称> 被连结点的名称<ADDRESS>....</ADDRESS> 用来显示电子邮箱地址<B> 粗体字<BASE TARGET> 指定超级链接的分割窗口<BASEFONT SIZE> 更改预设字形大小<BGSOUND SRC> 加入背景音乐<BIG> 显示大字体<BLINK> 闪烁的文字<BODY TEXT LINK VLINK> 设定文字颜色<BODY> 显示本文<BR> 换行<CAPTION ALIGN> 设定表格标题位置<CAPTION>...</CAPTION> 为表格加上标题<CENTER> 向中对齐<CITE>...<CITE> 用于引经据典的文字<CODE>...</CODE> 用于列出一段程序代码<COMMENT>...</COMMENT> 加上批注<DD> 设定定义列表的项目解说<DFN>...</DFN> 显示"定义"文字<DIR>...</DIR> 列表文字卷标<DL>...</DL> 设定定义列表的卷标<DT> 设定定义列表的项目<EM> 强调之用<FONT FACE> 任意指定所用的字形<FONT SIZE> 设定字体大小<FORM ACTION> 设定户动式窗体的处理方式<FORM METHOD> 设定户动式窗体之资料传送方式<FRAME MARGINHEIGHT> 设定窗口的上下边界<FRAME MARGINWIDTH> 设定窗口的左右边界<FRAME NAME> 为分割窗口命名<FRAME NORESIZE> 锁住分割窗口的大小<FRAME SCROLLING> 设定分割窗口的滚动条<FRAME SRC> 将HTML文件加入窗口<FRAMESET COLS> 将窗口分割成左右的子窗口<FRAMESET ROWS> 将窗口分割成上下的子窗口<FRAMESET>...</FRAMESET> 划分分割窗口<H1>~<H6> 设定文字大小<HEAD> 标示文件信息<HR> 加上分网格线<HTML> 文件的开始与结束<I> 斜体字<IMG ALIGN> 调整图形影像的位置<IMG ALT> 为你的图形影像加注<IMG DYNSRC LOOP> 加入影片<IMG HEIGHT WIDTH> 插入图片并预设图形大小。
asp.net内置对象Response对象使用介绍
内置对象Response对象使⽤介绍Response对象是HttpRespone类的⼀个实例。
该类主要是封装来⾃操作的HTTP相应信息。
Response对象将数据作为请求的结果从服务器发送到客户浏览器中,并提供有关响应的消息。
它可⽤来在页⾯中输出数据,在页⾯中跳转,还可以传递各个页⾯的参数。
⼀、向页⾯中输出数据语法格式Response对象通过Write⽅法或WriteFile⽅法在页⾯输出数据,输出的对象可以是字符,字符串,字符数组,对象或⽂件。
⽤Response输出数据时,最重要的语法是:Response.Write(...);实例:(1)建⽴⼀个空⽹站,将⽹页的标题设置为“在页⾯中输出数据”。
(2)右击资源管理器中的项⽬名称,选择“添加新项”命令,在弹出的添加新项的对话框中选择“⽂本⽂件”,名称设置为“WriteFile.txt”。
(3)在WriteFile.txt⽂本⽂件中输⼊如下⽂本:English can be displayed normally.For example,this is a book.<br/>但是中⽂⽂字需要设置⼀下:<br/>即在Response.Write开始写上如下的语句:<br/>Response.ContentEncoding = System.Text.Encoding.UTF8;或Response.ContentEncoding = System.Text.Encoding.Default;<hr/>(4)在Default.aspx.cs⽂件中找到Page_Load函数,在函数中输⼊如下内容://Response.ContentEncoding = System.Text.Encoding.UTF8;//Response.ContentEncoding = System.Text.Encoding.Default;char c='a';string s="⽤Response打印字符串";char[] cArray = { '⽤', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '打', '印','字','符','数','组',};Page p = new Page();Response.Write("输出单个字符:"+c+"<hr/>");Response.Write("输出⼀个字符串:" + s + "<hr/>");Response.Write("输出字符数组:");Response.Write(cArray,0,cArray.Length);Response.Write("<hr/>");Response.Write("输出⼀个对象:" + p + "<hr/>");Response.Write("输出⼀个⽂件:" + "<hr/>");Response.WriteFile(@"~\WriteFile.txt");(5)启动调试运⾏的结果为:⼆、向页⾯输出图像⽂件1)利⽤WriteFIle⽅法语法格式该⽅法将图⽚⽂件以⽂件流的⽅式输出到客户端页⾯。
contentType详解
HTML 中的ContentTypeContent-Type ,连接类型,一般是指网页中存在的Content-Type ,用于定义网络文件的类型和网页的编码,决定浏览器将以什么形式、什么编码读取这个文件,这就是经常看到一些网页点击的结果却是下载到的一个文件或一张图片的原因。
语法: HTML以下是ContentType 类型列表:Office2007对应的值:"application/vnd.openxmlformats-officedocument.wordprocessingml.template" (for .dotx files)"application/vnd.openxmlformats-officedocument.presentationml.presentation" (for .pptx files)"application/vnd.openxmlformats-officedocument.presentationml.slideshow" (for .ppsx files)"application/vnd.openxmlformats-officedocument.presentationml.template" (for .potx files) "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" (for .xlsx files) "application/vnd.openxmlformats-officedocument.spreadsheetml.template" (for .xltx files)相对于Office2003是这样的Response.ContentType = "application/vnd。
Response对象解释
一、Response对象功能:response对象控制向客户端浏览器输出信息。
语法:response[.属性|方法|集合](“变量”)1、 Response对象的常用属性(1)BufferBuffer属性设置页面显示时是否在服务器端缓冲。
若设置为true则当页面代码全部执行完毕或调用Flush或End方法后,服务器才将页面执行结果发送给客户端,否则服务器边执行边发送。
ASP3.0以上版本默认值为true;Windows2000的IIS5中默认值也为true。
(2)CharsetCharset属性设置页面显示中所使用的字符集。
此属性设置后在客户端浏览器代码的HTML头信息的meta属性增加一个属性值对,charset=字符集名。
(3)ContenttypeContenttype属性设置客户端HTTP文件格式。
此属性设置后在客户端浏览器代码的HTML 头信息的meta属性增加一个属性值对,content=网页内容类型。
(4)IsclientconnectedIsclientconnected属性为只读属性,表示客户端与服务器端是否连接。
若此属性返回值为True则表示客户端与服务器端处于连接状态,否则表示客户端与服务器端已经断开。
2、Response对象的方法(1)Write功能:在服务器端将指定数据发送给客户端浏览器。
语法:response.write变量或字符串省略用法:<%= 变量或字符串 %>说明:字符串内含有引号时,外层使用双引号,内层使用单引号,不能用单引号时使用chr(34)替换。
例如:<!-- 基本用法格式-- ><%name="zyj"name & ",您的访问时间是:"& now()%><!-- 省略用法格式-- ><%= name&",您的访问时间是:"& now() %>(2)Redirect功能:重定向当前客户端浏览器连接到另一个URL页面。
Content-type的说明即HTTP请求头的类型整理
Content-type的说明即HTTP请求头的类型整理要学习content-type,必须事先知道它到底是什么,是⼲什么⽤的。
HTTP协议(RFC2616)采⽤了请求/响应模型。
客户端向服务器发送⼀个请求,请求头包含请求的⽅法、URI、协议版本、以及包含请求修饰符、客户信息和内容的类似于MIME的消息结构。
服务器以⼀个状态⾏作为响应,相应的内容包括消息协议的版本,成功或者错误编码加上包含服务器信息、实体元信息以及可能的实体内容。
通常HTTP消息由⼀个起始⾏,⼀个或者多个头域,⼀个只是头域结束的空⾏和可选的消息体组成。
HTTP的头域包括通⽤头,请求头,响应头和实体头四个部分。
每个头域由⼀个域名,冒号(:)和域值三部分组成。
域名是⼤⼩写⽆关的,域值前可以添加任何数量的空格符,头域可以被扩展为多⾏,在每⾏开始处,使⽤⾄少⼀个空格或制表符。
请求消息和响应消息都可以包含实体信息,实体信息⼀般由实体头域和实体组成。
实体头域包含关于实体的原信息,实体头包括Allow、Content- Base、Content-Encoding、Content-Language、 Content-Length、Content-Location、Content-MD5、Content-Range、Content-Type、 Etag、Expires、Last-Modified、extension-header。
Content-Type是返回消息中⾮常重要的内容,表⽰后⾯的⽂档属于什么MIME类型。
Content-Type: [type]/[subtype]; parameter。
例如最常见的就是text/html,它的意思是说返回的内容是⽂本类型,这个⽂本⼜是HTML格式的。
原则上浏览器会根据Content-Type来决定如何显⽰返回的消息体内容。
type有下⾯的形式Text:⽤于标准化地表⽰的⽂本信息,⽂本消息可以是多种字符集和或者多种格式的;Multipart:⽤于连接消息体的多个部分构成⼀个消息,这些部分可以是不同类型的数据;Application:⽤于传输应⽤程序数据或者⼆进制数据;Message:⽤于包装⼀个E-mail消息;Image:⽤于传输静态图⽚数据;Audio:⽤于传输⾳频或者⾳声数据;Video:⽤于传输动态影像数据,可以是与⾳频编辑在⼀起的视频数据格式。
Response.setContentType()
Response.setContentType()Response.setContentType(MIME)的作⽤是时客户端的浏览器区分不同种类的数据,并根据不同的MIME调⽤浏览器内不同的程序嵌⼊模块来处理相应的数据。
MIME的作⽤:由于MIME类型与⽂档的后缀相关,因此服务器使⽤⽂档的后缀来区分不同⽂件的MIME类型,服务器中必须定义⽂档后缀和MIME类型之间的对应关系。
⽽客户程序从服务器上接收数据的时候,它只是从服务器接受数据流,并不了解⽂档的名字,因此服务器必须使⽤附加信息来告诉客户程序数据的MIME类型。
服务器在发送真正的数据之前,就要先发送标志数据的MIME类型的信息,这个信息使⽤Content-type 关键字进⾏定义,例如对于HTML⽂档,服务器将⾸先发送以下两⾏MIME标识信息,这个标识并不是真正的数据⽂件的⼀部分。
Content-type:text/html注意,第⼆⾏为⼀个空⾏,这是必须的,使⽤这个空⾏的⽬的是将MIME信息与真正的数据内容分隔开。
MIME信息头有:MIME-Version:Content-Type:(常⽤。
该实体头的作⽤是让服务器告诉浏览器它发送的数据属于什么⽂件类型。
)Content-Transfer-Encoding:Content-ID:Content-Disposition: (常⽤。
当Content-Type 的类型为要下载的类型时 , 这个信息头会告诉浏览器这个⽂件的名字和类型。
)⼀般在Servlet中,我们会⾸先设置请求以及响应的内容类型和编码⽅式:response.setContentType(“text/html;charset=UTF-8”);response.setCharacterEncoding(“UTF-8”);************************************************************************************************类型⼤全格式前⾯为后辍名,后⾯为对应的MIME型。
response设置响应头的常用几种方法
response设置响应头的常⽤⼏种⽅法response 设置响应头的常⽤⼏种⽅法1.Location 的⽤法response.setStatus(302)//临时定向响应码response.setHeader("Location", "/day03_00_ResponseHeader/servlet/ResponseHeaderDemo2"); ///day03_00_ResponseHeader/servlet/ResponseHeaderDemo2 代表转向的地址2.response.setHeader("Content-Encoding", "gzip"); //告诉响应头以gzip 格式解码再输⼊输出流的时候⽤GZIPOutputStream 缩⼩⽂件的⼤⼩。
3.//刷新Refershresponse.setHeader("Refresh", "3;url="); //告诉客户端三秒后刷新4.Content-Disposition 通知客户端以下载的⽅式接受数据response.setHeader("Content-Disposition", "attachment;filename=2.jpg");5.Content-Type//告知客户端响应正⽂类型response.setHeader("Content-Type", "application/octet-stream");6. Expires 控制缓存//控制浏览器不要缓存response.setHeader("Expires", "-1");response.setHeader("Cache-Control", "no-cache");response.setHeader("Pragma", "no-cache");//控制缓存时间 response.setDateHeader("Expires", System.currentTimeMillis()+1*60*60*1000);7. 设置response参数,可以打开下载页⾯response.reset();response.setContentType("application/x-msdownload;charset=utf-8");//设置响应头,控制浏览器下载该⽂件response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode("课程签到⼆维码.png", "UTF-8"));。
response.setContentType()的参数
<meta http-equiv="Content-Type" content="text/html; charset=GBK"> response.setContentType() ;* = application/octet-stream.001 = application/x-001.301 = application/x-301.323 = text/h323.906 = application/x-906.907 = drawing/907.a11 = application/x-a11.acp = audio/x-mei-aac.ai = application/postscript.aif = audio/aiff.aifc = audio/aiff.aiff = audio/aiff.anv = application/x-anv.asa = text/asa.asf = video/x-ms-asf.asp = text/asp.asx = video/x-ms-asf.au = audio/basic.avi = video/avi.awf = application/vnd.adobe.workflow.biz = text/xml.bmp = application/x-bmp.bot = application/x-bot.c4t = application/x-c4t.c90 = application/x-c90.cal = application/x-cals.cat = application/vnd.ms-pki.seccat.cdf = application/x-netcdf.cdr = application/x-cdr.cel = application/x-cel.cer = application/x-x509-ca-cert.cg4 = application/x-g4.cgm = application/x-cgm.cit = application/x-cit.class = java/*.cml = text/xml :客户端浏览器按XML格式进行解析文档.cmp = application/x-cmp.cmx = application/x-cmx.cot = application/x-cot.crl = application/pkix-crl.crt = application/x-x509-ca-cert.csi = application/x-csi.css = text/css :客户端浏览器按CSS格式进行解析文档.cut = application/x-cut.dbf = application/x-dbf.dbm = application/x-dbm.dbx = application/x-dbx.dcd = text/xml :客户端浏览器按XML格式进行解析文档.dcx = application/x-dcx.der = application/x-x509-ca-cert.dgn = application/x-dgn.dib = application/x-dib.dll = application/x-msdownload.doc = application/msword.dot = application/msword.drw = application/x-drw.dtd = text/xml :客户端浏览器按XML格式进行解析文档.dwf = Model/vnd.dwf.dwf = application/x-dwf.dwg = application/x-dwg.dxb = application/x-dxb.dxf = application/x-dxf.edn = application/vnd.adobe.edn.emf = application/x-emf.eml = message/rfc822.ent = text/xml :客户端浏览器按XML格式进行解析文档.epi = application/x-epi.eps = application/x-ps.eps = application/postscript.etd = application/x-ebx.exe = application/x-msdownload.fax = image/fax.fdf = application/vnd.fdf.fif = application/fractals.fo = text/xml :客户端浏览器按XML格式进行解析文档.frm = application/x-frm.g4 = application/x-g4.gbr = application/x-gbr.gcd = application/x-gcd.gif = image/gif.gl2 = application/x-gl2.gp4 = application/x-gp4.hgl = application/x-hgl.hmr = application/x-hmr.hpg = application/x-hpgl.hpl = application/x-hpl.hqx = application/mac-binhex40.hrf = application/x-hrf.hta = application/hta.htc = text/x-component.htm = text/html :客户端浏览器按超文本格式进行解析文档.html = text/html :客户端浏览器按超文本格式进行解析文档.htt = text/webviewhtml.htx = text/html :客户端浏览器按超文本格式进行解析文档.icb = application/x-icb.ico = image/x-icon.ico = application/x-ico.iff = application/x-iff.ig4 = application/x-g4.igs = application/x-igs.iii = application/x-iphone.img = application/x-img.ins = application/x-internet-signup.isp = application/x-internet-signup.IVF = video/x-ivf.java = java/*.jfif = image/jpeg.jpe = image/jpeg.jpe = application/x-jpe.jpeg = image/jpeg.jpg = image/jpeg.jpg = application/x-jpg.js = application/x-javascript.jsp = text/html :客户端浏览器按超文本格式进行解析文档.la1 = audio/x-liquid-file.lar = application/x-laplayer-reg.latex = application/x-latex.lavs = audio/x-liquid-secure.lbm = application/x-lbm.lmsff = audio/x-la-lms.ls = application/x-javascript.ltr = application/x-ltr.m1v = video/x-mpeg.m2v = video/x-mpeg.m3u = audio/mpegurl.m4e = video/mpeg4.mac = application/x-mac.man = application/x-troff-man.math = text/xml.mdb = application/msaccess.mdb = application/x-mdb.mfp = application/x-shockwave-flash.mht = message/rfc822.mhtml = message/rfc822.mi = application/x-mi.mid = audio/mid.midi = audio/mid.mil = application/x-mil.mml = text/xml.mnd = audio/x-musicnet-download.mns = audio/x-musicnet-stream.mocha = application/x-javascript.movie = video/x-sgi-movie.mp1 = audio/mp1.mp2 = audio/mp2.mp2v = video/mpeg.mp3 = audio/mp3.mp4 = video/mpeg4.mpa = video/x-mpg.mpd = application/vnd.ms-project.mpe = video/x-mpeg.mpeg = video/mpg.mpg = video/mpg.mpga = audio/rn-mpeg.mpp = application/vnd.ms-project.mps = video/x-mpeg.mpt = application/vnd.ms-project.mpv = video/mpg.mpv2 = video/mpeg.mpw = application/vnd.ms-project.mpx = application/vnd.ms-project.mtx = text/xml.mxp = application/x-mmxp.net = image/pnetvue.nrf = application/x-nrf.nws = message/rfc822.odc = text/x-ms-odc.out = application/x-out.p10 = application/pkcs10.p12 = application/x-pkcs12.p7b = application/x-pkcs7-certificates .p7c = application/pkcs7-mime.p7m = application/pkcs7-mime.p7r = application/x-pkcs7-certreqresp.p7s = application/pkcs7-signature.pc5 = application/x-pc5.pci = application/x-pci.pcl = application/x-pcl.pcx = application/x-pcx.pdf = application/pdf :客户端浏览器按PDF格式进行解析文档.pdf = application/pdf.pdx = application/vnd.adobe.pdx.pfx = application/x-pkcs12.pgl = application/x-pgl.pic = application/x-pic.pko = application/vnd.ms-pki.pko.pl = application/x-perl.plg = text/html.pls = audio/scpls.plt = application/x-plt.png = image/png.png = application/x-png.pot = application/vnd.ms-powerpoint.ppa = application/vnd.ms-powerpoint.ppm = application/x-ppm.pps = application/vnd.ms-powerpoint.ppt = application/vnd.ms-powerpoint.ppt = application/x-ppt.pr = application/x-pr.prf = application/pics-rules.prn = application/x-prn.prt = application/x-prt.ps = application/x-ps.ps = application/postscript.ptn = application/x-ptn.pwz = application/vnd.ms-powerpoint.r3t = text/vnd.rn-realtext3d.ra = audio/vnd.rn-realaudio.ram = audio/x-pn-realaudio.ras = application/x-ras.rat = application/rat-file.rdf = text/xml.rec = application/vnd.rn-recording.red = application/x-red.rgb = application/x-rgb.rjs = application/vnd.rn-realsystem-rjs.rjt = application/vnd.rn-realsystem-rjt.rlc = application/x-rlc.rm = application/vnd.rn-realmedia.rmf = application/vnd.adobe.rmf.rmi = audio/mid.rmj = application/vnd.rn-realsystem-rmj.rmm = audio/x-pn-realaudio.rmp = application/vnd.rn-rn_music_package.rms = application/vnd.rn-realmedia-secure.rmvb = application/vnd.rn-realmedia-vbr.rmx = application/vnd.rn-realsystem-rmx.rnx = application/vnd.rn-realplayer.rp = image/vnd.rn-realpix.rpm = audio/x-pn-realaudio-plugin.rsml = application/vnd.rn-rsml.rt = text/vnd.rn-realtext.rtf = application/msword.rtf = application/x-rtf.rv = video/vnd.rn-realvideo.sam = application/x-sam.sat = application/x-sat.sdp = application/sdp.sdw = application/x-sdw.sit = application/x-stuffit.slb = application/x-slb.sld = application/x-sld.slk = drawing/x-slk.smi = application/smil.smil = application/smil.smk = application/x-smk.snd = audio/basic.sol = text/plain.sor = text/plain.spc = application/x-pkcs7-certificates.spl = application/futuresplash.spp = text/xml.ssm = application/streamingmedia.sst = application/vnd.ms-pki.certstore.stl = application/vnd.ms-pki.stl.stm = text/html.sty = application/x-sty.svg = text/xml.swf = application/x-shockwave-flash :客户端浏览器按 Flash 格式进行解析文档.tdf = application/x-tdf.tg4 = application/x-tg4.tif = image/tiff.tif = application/x-tif.tiff = image/tiff.tld = text/xml.top = drawing/x-top.torrent = application/x-bittorrent.tsd = text/xml.txt = text/plain :客户端浏览器按纯文本格式进行解析文档.uin = application/x-icq.uls = text/iuls.vcf = text/x-vcard.vda = application/x-vda.vdx = application/vnd.visio.vml = text/xml.vpg = application/x-vpeg005.vsd = application/vnd.visio.vsd = application/x-vsd.vss = application/vnd.visio.vst = application/vnd.visio.vst = application/x-vst.vsw = application/vnd.visio.vsx = application/vnd.visio.vtx = application/vnd.visio.vxml = text/xml.wav = audio/wav.wax = audio/x-ms-wax.wb1 = application/x-wb1.wb2 = application/x-wb2.wb3 = application/x-wb3.wbmp = image/vnd.wap.wbmp.wiz = application/msword.wk3 = application/x-wk3.wk4 = application/x-wk4.wkq = application/x-wkq.wks = application/x-wks.wm = video/x-ms-wm.wma = audio/x-ms-wma.wmd = application/x-ms-wmd.wmf = application/x-wmf.wml = text/vnd.wap.wml.wmv = video/x-ms-wmv.wmx = video/x-ms-wmx.wmz = application/x-ms-wmz.wpd = application/x-wpd.wpg = application/x-wpg.wpl = application/vnd.ms-wpl.wq1 = application/x-wq1.wr1 = application/x-wr1.wri = application/x-wri.wrk = application/x-wrk.ws = application/x-ws.ws2 = application/x-ws.wsc = text/scriptlet.wsdl = text/xml.wvx = video/x-ms-wvx.xdp = application/vnd.adobe.xdp.xdr = text/xml.xfd = application/vnd.adobe.xfd.xfdf = application/vnd.adobe.xfdf.xhtml = text/html.xls = application/vnd.ms-excel.xls = application/x-xls.xlw = application/x-xlw.xml = text/xml.xpl = audio/scpls.xq = text/xml.xql = text/xml.xquery = text/xml.xsd = text/xml.xsl = text/xml.xslt = text/xml.xwd = application/x-xwd.x_b = application/x-x_b.x_t = application/x-x_t(注:可编辑下载,若有不当之处,请指正,谢谢!)。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
'jpg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'png' => 'image/png',
'tiff' => 'image/tiff',
'tex' => 'application/x-tex',
'texinfo' => 'application/x-texinfo',
'texi' => 'application/x-texinfo',
't' => 'application/x-troff',
'tif' => 'image/tiff',
'djvu' => 'image/vnd.djvu',
'djv' => 'image/vnd.djvu',
'wbmp' => 'image/vnd.wap.wbmp',
'wbxml' => 'application/vnd.wap.wbxml',
'wmlc' => 'application/vnd.wap.wmlc',
'wmlsc' => 'application/vnd.wap.wmlscriptc',
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'skm' => 'application/x-koan',
'latex' => 'application/x-latex',
'nc' => 'application/x-netcdf',
'cdf' => 'application/x-netcdf',
'mp2' => 'audio/mpeg',
'mp3' => 'audio/mpeg',
'aif' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'xwd' => 'image/x-xwindowdump',
'igs' => 'model/iges',
'iges' => 'model/iges',
'msh' => 'model/mesh',
'ms' => 'application/x-troff-ms',
'ustar' => 'application/x-ustar',
'src' => 'application/x-wais-source',
'xhtml' => 'application/xhtml+xml',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
'tr' => 'application/x-troff',
'roff' => 'application/x-troff',
'man' => 'application/x-troff-man',
'me' => 'application/x-troff-me',
'bcpio' => 'application/x-bcpio',
'vcd' => 'application/x-cdlink',
'pgn' => 'application/x-chess-pgn',
'cpio' => 'application/x-cpio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'wav' => 'audio/x-wav',
'pdb' => 'chemical/x-pdb',
'sv4cpio' => 'application/x-sv4cpio',
'sv4crc' => 'application/x-sv4crc',
'tar' => 'application/x-tar',
'tcl' => 'application/x-tcl',
'ras' => 'image/x-cmu-raster',
'pnm' => 'image/x-portable-anymap',
'pbm' => 'image/x-portable-bitmap',
'pgm' => 'image/x-portable-graymap',
'ppm' => 'image/x-portable-pixmap',
'rgb' => 'image/x-rgb',
'xbm' => 'image/x-xbitmap',
'xpm' => 'image/x-xpixmap',
'csh' => 'application/x-csh',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'spl' => 'application/x-futuresplash',
'gtar' => 'application/x-gtar',
'hdf' => 'application/x-hdf',
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'kar' => 'audio/midi',
'mpga' => 'audio/mpeg',
'so' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => 'application/pdf',
'sh' => 'application/x-sh',