Response ContentType 详细列表

Response ContentType 详细列表不同的ContentType会影响客户端所看到的效果.默认的ContentType为text/html也就是网页格式.代码如:显示的为网页,而则会显示html原代码.以下为一些常用的ContentTypeGIFimagesJPEGimagesTIFFimages

大家好,又见面了,我是你们的朋友全栈君。不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是网页格式.
代码如:

<% response.ContentType =”text/html” %>
<!–#i nclude virtual=”/ContentType.html” –>


显示的为网页,而

<% response.ContentType =”text/plain” %>
<!–#i nclude virtual=”/sscript/ContentType.html” –>


则会显示html原代码.

以下为一些常用的 ContentType
GIF 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’,
‘ai’ => ‘application/postscript’,
‘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’,
‘ra’ => ‘audio/x-realaudio’,
‘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’

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/161596.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Asp.net Core + EF Core + Bootstrap搭建的MVC后台通用管理系统模板(跨平台版本)

    Asp.net Core + EF Core + Bootstrap搭建的MVC后台通用管理系统模板(跨平台版本)6月随着.NETCOREPREVIEW2的发布,JUCHEAP的CORE版本也由之前的JuCheapCore1.0升级到了JuCheapCore2.0,并且已经在将core版本应用到了生产环境中,现在支持的数据库库有SQLSERVER2008以上,以及SQLITE;项目源代码地址,在文末.部署到ubuntu16.04下的效果如下:源码下载地址:h…

    2022年7月22日
    10
  • 深度学习超分辨率重建(总结)[通俗易懂]

    本文为概述,详情翻看前面文章。1.SRCNN:—2,3改进开山之作,三个卷积层,输入图像是低分辨率图像经过双三次(bicubic)插值和高分辨率一个尺寸后输入CNN。图像块的提取和特征表示,特征非线性映射和最终的重建。使用均方误差(MSE)作为损失函数。2.FSRCNN特征提取:低分辨率图像,选取的核9×9设置为5×5。收缩:1×1的卷积核进行降维。非线性映射:用两个串联的3×3的卷积核可以…

    2022年4月1日
    41
  • RabbitMQ消费消息坑:failed to convert serialized Message content

    RabbitMQ消费消息坑:failed to convert serialized Message content文章目录一、问题描述二、解决方案方案一:共同使用一个对象方案二:消息JSON序列化(推荐)2.1.生产者发送消息JSON序列化2.2.消费者接收消息JSON反序列化三、测试一、问题描述2022-05-0314:01:40.630WARN16876—[ntContainer#0-2]s.a.r.l.ConditionalRejectingErrorHandler:ExecutionofRabbitmessagelistenerfailed.org.springfram

    2022年6月16日
    633
  • 动态规划C++实现–最长递增子序列

    动态规划C++实现–最长递增子序列题目:给定数组arr,返回arr的最长递增子序列。举例:arr=[2,1,5,3,6,4,8,9,7],返回的最长递增子序列为[1,3,4,8,9]要求:如果arr长度为N,请实现时间复杂度为O(NlogN)的方法。一、先介绍时间复杂度O(N^2)的方法,具体过程如下:1.生成长度为N的数组dp,dp[i]表示在以arr[i]这个数结尾的情况下,arr[0…

    2022年6月7日
    60
  • MyBatis3与Spring4整合方法详解(使用SqlSessionTemplate类)

    MyBatis3与Spring4整合方法详解(使用SqlSessionTemplate类)摘要:由于项目需要,第一次接触MyBatis,在网上找了很多MyBatis与Spring的整合方法,网上的资料不够详细,虽然讲了很多整合方法,但却没有针对每一种方法去详细讲解,对于没有相关基础的人难以操作,因此自己整理记录如下转载自:http://p.primeton.com/articles/54c1dcc5be20aa3884000012由于项目需要,第一次接触MyBatis,

    2022年5月18日
    61
  • Docker 开启API:2375[通俗易懂]

    Docker 开启API:2375[通俗易懂]Docker开启APIDocker默认文件位置:/usr/lib/systemd/system/docker.servicecd/usr/lib/systemd/system/vimdocker.service修改[Service]区ExecStart行为下面的内容[Service]Type=notify#thedefaultisnottousesy…

    2022年6月10日
    42

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号