[thelist] parse file.js with PHP
Means, Eric D
eric.d.means at boeing.com
Thu Jun 27 10:35:08 CDT 2002
> -----Original Message-----
> From: Hassan Schroeder [mailto:hassan at webtuitive.com]
> Sent: Thursday, June 27, 2002 9:39 AM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] parse file.js with PHP
>
> "Means, Eric D" wrote:
>
> > Calling it file.php is probably a bad idea, because some browsers may
want
> > it to be served as text/javascript or whatever, which could cause
issues.
>
> No, /not returning a proper content-type header/ is the bad idea;
> the file's name/extension is irrelevant. :-)
Well, yes, except that the server (initially) sets the content type based on
the extension. So a PHP file is likely to be served as text/html. Now, if
you were to use header() to set the content type properly that would cease
to be an issue.
However, I don't know if there are browsers out there that *do* use the
extension and ignore the content-type (improperly), so that's something to
take into account.
More information about the thelist
mailing list