Recently encountered a very depressing question, the general situation is as follows:
There is a Java application at hand, which has an action set response header Content-type to text/plain;charset=**, resulting in a part of the client machine access to this URL appears to run normally, but the page appears on the download.
For example, we are visiting Http://localhost/test/a.jspa, and a download box prompts you to download the A.jspa file and the file type is jspa_auto_file.
After two days of search finally to get a clue, it is the registry in the HKEY_CLASSES_ROOT item under a more than one subkey. Jspa and the value of this subkey is Jspa_auto_file.
Then I did some tests and found that only the following three conditions were met: The background Application settings response Header Content-type is a subkey with the same name as the URL suffix under HKEY_CLASSES_ROOT in the text/plain;charset=** registry. The value of the subkey is the name +_auto_file of the subkey. For example, the URL is http://localhost/a.suffix. Suffix the name of the subkey is. Suffix_auto_file The data returned is plain text
The above situation will arise.
Why, according to the information on the Web and the MSDN documentation, my guesses are as follows:
IE will automatically detect the MIME type when parsing the URL, and when encountering the Text/plain type, he will find out if there is a match under the HKEY_CLASSES_ROOT entry in the registry, and if so, it will be parsed using this value.
Also hope that the master of IE cooked advice