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#typesconfig [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 <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx