在做文件上传的处理,发现在IE下会弹出‘下载服务器返回给浏览器的json代码‘, 其它非IE内核浏览器正常,后来发现,ie是不支持application/json的,所以在服务器端改回了text/html就行了。IE9及以下目前所支持的mime类型,摘抄下来以备后用。

Known MIME Types

MIME Type Description
text/plain Plain text. Default if data is primarily text and no other type detected.
text/html HTML. Default if common tags detected and server does not supply image/* type.
text/xml XML data. Default if data specifies <?xml with an unrecognized DTD.
text/richtext Rich Text Format (RTF).
text/scriptlet Windows script component.
audio/x-aiff Audio Interchange File, Macintosh.
audio/basic Audio file, UNIX.
audio/mid Windows Internet Explorer 7 and later. MIDI sequence.
audio/wav Pulse Code Modulation (PCM) Wave audio, Windows.
image/gif Graphics Interchange Format (GIF).
image/jpeg JPEG image.
image/pjpeg Default type for JPEG images.
image/png Internet Explorer 7 and later. Portable Network Graphics (PNG).
image/x-png Internet Explorer 7 and later. Default type for PNG images.
image/tiff Tagged Image File Format (TIFF) image.
image/bmp Bitmap (BMP) image.
image/x-xbitmap Removed from Windows Internet Explorer 8.
image/x-jg AOL Johnson-Grace compressed file.
image/x-emf Enhanced Metafile (EMF).
image/x-wmf Windows Metafile Format (WMF).
video/avi Audio-Video Interleaved (AVI) file.
video/mpeg MPEG stream file.
application/octet-stream Binary file. Default if data is primarily binary.
application/postscript PostScript (.ai, .eps, or .ps) file.
application/base64 Base64-encoded bytes.
application/macbinhex40 BinHex for Macintosh.
application/pdf Portable Document Format (PDF).
application/xml XML data. Must be server-supplied. See also "text/xml" type.
application/atom+xml Internet Explorer 7 and later. Atom Syndication Format feed.
application/rss+xml Internet Explorer 7 and later. Really Simple Syndication (RSS) feed.
application/x-compressed UNIX tar file, Gzipped.
application/x-zip-compressed Compressed archive file.
application/x-gzip-compressed Gzip compressed archive file.
application/java Java applet.
application/x-msdownload Executable (.exe or .dll) file.