wood burning stoves 2.0*
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: 60780
    
  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: 60780
    
  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: 60780
    
  65

Of the many types that the response could be, how would the browser know which was sent unless it was told?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Requirement of MIME
 
Similar Threads
Configuring Tomcat 5 on Win2K and Linux
Mistakenly changed web.xml
where word files are saved after downloading
doubt in how response reaches the client....
web.xml causes 404 error