in reply to How do i force the user to download my content?
A browser requests a document, and in return receives the answer from the server. The Browser remits a mime-type-list of which types he is able to view or in any other way to process. If a server would send a browser a mime-type declaration for a document to which the browser has no application assigned to handle it, (yes this is badly faking and not conformant to any standard as it only works in breaking the standard) then the browser would offer the download to the user. eg. you send something like
"Content-Type: application/cherry-pie" no browser would know what to do with a file of such format, hence offering to save it. But DON'T do that if you respect your visitors :-) They would probably dislike the need of renaming files and fear that you'd just 'forced' them into downloading malicious code. :-)
|