This week's book giveaway is in the Java in General forum. We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line! See this thread for details.
When you are sending a file which the browser can open , then browser wouldnot give you the option of saving the file ; rather this would try to open the file.(Like html , xml , and pdf [if acrobat reader is installed.]). In case you want to send an xml , it would be read by the browser rather then giving the use an option to save this file.
then browser wouldnot give you the option of saving the file
Only if the user wants it so. The first time the browser sees an unknown file format it will ask the user what to do with it. If the user specifies that files of that type should be saved to disk, then the browser will not try to open them.
When the browser can open a file (in other words the browser understands the format of the data.) then it opens the files directly
This is incorrect. Please re-read my previous post. Files downloaded as described above will not be opened -no matter which file type they are- unless they user specifically requested that at some point. Until she does, the file save dialog will be shown.