I was wondering how a browser decides what to do when you provide a link that is actually meant for downloading not redirecting to another page. How does the browser know for example not to redirect you to a page called http://domain/Music.mp3 rather that just throw the option to download the said file instead? Does the browser look at the content type on the file when the user requests it or does it look at the extension in the url?
Any help much appreciated.
Regards
This is down to a number of things, the main one being MIME type. In the response from the webserver, it contains the line “Content-Type”. Your browser will look at this and perform its default actions.
When I access a HTML page the response contains:
When you go to a
.WMAfile, the response is: (I could only quickly find a .WMA on my webserver!)