File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Requirement of MIME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Requirement of MIME" Watch "Requirement of MIME" New topic
Author

Requirement of MIME

Harsh Khurana
Greenhorn

Joined: Jul 16, 2012
Posts: 3
A browser sends the accept details along with the request (i.e. what all type of data it can read in the server response), Then why the server needs to response back the mime type. I mean it should simply send the response without the mime type since it already knows the type of data the browser can read. So, what is the importance of a mime??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

Harsh Khurana wrote: since it already knows the type of data the browser can read.

It does not. There are many types of data the browser can handle.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Harsh Khurana
Greenhorn

Joined: Jul 16, 2012
Posts: 3
ya... i agree... but the type of data the browser handles, it tells the server along with the request. then why server need to send the mime type.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

The Accepts header can specify many types on the request, how would the browser know which is being sent back without a response type?
Harsh Khurana
Greenhorn

Joined: Jul 16, 2012
Posts: 3
The server already knows that a browser can take the accept type of data. why do the browser needs to know it?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

Of the many types that the response could be, how would the browser know which was sent unless it was told?
 
wood burning stoves
 
subject: Requirement of MIME