File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Requirement of MIME

 
Harsh Khurana
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Harsh Khurana
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of the many types that the response could be, how would the browser know which was sent unless it was told?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic