application/x-javascript vs application/javascript
am 07.10.2009 17:19:34 von howa
Hello,
Why in some Apache httpd, JavaScript is sent by Content Type =
application/x-javascript, but some httpd is application/javascript?
Both are 2.2.
Thanks.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: application/x-javascript vsapplication/javascript
am 07.10.2009 17:51:47 von Tom Evans
On Wed, 2009-10-07 at 23:19 +0800, howard chen wrote:
> Hello,
>
> Why in some Apache httpd, JavaScript is sent by Content Type =
> application/x-javascript, but some httpd is application/javascript?
>
> Both are 2.2.
>
>
> Thanks.
>
The mime type of a file sent from disk is determined by apache using the
file extension and looking it up in the mime.types file referenced in
the apache config with the directive TypesConfig[1], which defaults to
'conf/mime.types', relative to the ServerRoot.
In the stock apache mime.types, .js files are configured as such:
> $ egrep js$ /usr/local/etc/apache22/mime.types
application/javascript js
If you are getting a different mime-type, then that is because either
your mime.types file has a different setting, or it is being overridden
with an explicit
AddType application/x-javascript .js
Cheers
Tom
[1] http://httpd.apache.org/docs/2.2/mod/mod_mime.html#typesconf ig
[2] http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org