When we enter a url which is actually a song, will start playing or say streams in chrome but when we save that page it saves as mp3 ie downloads that song. Is something different between this two and browser handles it or they are actually same inside .
Asked
Active
Viewed 119 times
0
-
1Good place to start would be here: http://pl.wikipedia.org/wiki/Hypertext_Transfer_Protocol – Artur Nov 16 '13 at 18:49
1 Answers
0
It is basically the same thing, if the transfer is over http, except some information that indicates the file type. For a browers to show files, it basically downloads them as a regular file and interprets them, so displaying a page is basically a file download.
The transfer may use another protocol, like ftp (this can be used just for files).
A protocol is a way of communication between a client (a program in your computer) and a server (a program on another computer). Note that client and server are used sometimes to described the entire machine.
Web browsers are http clients, so, in order to use another protocol (like ftp, described above) you need to use a client for that protocol.

Paul92
- 8,827
- 1
- 23
- 37
-
Unless you want to 'force' the browser to download the file instead of showing it: use content-disposition. See this question: http://stackoverflow.com/questions/1012437/uses-of-content-disposition-in-an-http-response-header – user2970362 Nov 16 '13 at 18:48
-
When we enter a url which is actually a song, will start playing or say streams in chrome but when we save that page it saves as mp3 ie downloads that song. Is something different between this two and browser handles it or they are actually same inside .. – roxxypoxxy Nov 16 '13 at 18:56
-
1It's a difference in interpreting the data (on the browser side): it displays it (or plays it or whatever) or it packs it as a file. This is handled by some data fields in http protocol. But, the actual data is the same and it is still downloaded on your pc. – Paul92 Nov 16 '13 at 18:59
-
This clarifies something to me. The file is the same, it should be, but its the browser that handles according to our request and generates required headers ! – roxxypoxxy Nov 16 '13 at 19:21
-
1Actually are the response headers which gives the browser information about what thery are. Note that response headers are generated by the server. Using them, the browser decides what to do with the actual data. Request headers give informations to the server, about what the client wants. – Paul92 Nov 17 '13 at 12:23