Re: .php file extension in browsers
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: .php file extension in browsers

From: Chung Leong <chernyshevsky@hotmail.com>
Date: Tue Oct 04 2005 - 07:23:28 CEST

Malcolm Dew-Jones wrote:
> If the output of the php script is sent as "content-type: something/odd"
> then opera would correctly display a download dialog, whereas explorer
> would likely ignore the content-type and use the file extension plus what
> it "sees" in the data to guess it is supposed to be text/html and so
> display it.

Some clarification: IE will always sniff the content stream for the
file type. It only considers the content-type header when the test
returns inconclusive result (e.g. text/html vs. text/plain). The file
extension doesn't play a role at all. You can see for yourself by
saving a .txt file with the line "GIF89a is the signature of GIF files"
and retrieving it through IE.
Received on Tue Oct 18 02:31:16 2005