maxworx
asked on
Delivered HTTP charset for static html files
Hi,
I wanted to create some charset tests and write some short .html and .js files with certain charsets. I use Fiddler to view the HTTP requests/responses.
All .js files are delivered with "Content-Type: application/javascript" from my Apache 2.2.11. The .html files are delivered with "Content-Type: text/html; charset=utf-8" which causes the browser to ignore the included '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />' setting.
Where does the charset=utf-8 order come from?
The httpd.conf file doesn´t have a "AddDefaultCharset" setting. The result doesn´t change if I add this with a value of "AddDefaultCharset Off" or "AddDefaultCharset ISO-8859-1" in the last line (the httpd.conf file is the right one, other changes work).
Following modules are loaded (I think only mod_mime interests):
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default. so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default. so
LoadModule authz_groupfile_module modules/mod_authz_groupfil e.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so
Thie mime.types file contains this line:
text/html html htm
Are there any other files/options which can cause the delivered charset? How can I remove it?
Kind regards
I wanted to create some charset tests and write some short .html and .js files with certain charsets. I use Fiddler to view the HTTP requests/responses.
All .js files are delivered with "Content-Type: application/javascript" from my Apache 2.2.11. The .html files are delivered with "Content-Type: text/html; charset=utf-8" which causes the browser to ignore the included '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />' setting.
Where does the charset=utf-8 order come from?
The httpd.conf file doesn´t have a "AddDefaultCharset" setting. The result doesn´t change if I add this with a value of "AddDefaultCharset Off" or "AddDefaultCharset ISO-8859-1" in the last line (the httpd.conf file is the right one, other changes work).
Following modules are loaded (I think only mod_mime interests):
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.
LoadModule authz_groupfile_module modules/mod_authz_groupfil
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so
Thie mime.types file contains this line:
text/html html htm
Are there any other files/options which can cause the delivered charset? How can I remove it?
Kind regards
ASKER
None of them are active:
- there are a httpd-languages.conf file with a line "AddCharset UTF-8 .utf8" but these are not included
- there are a charset.conv file which I don´t know if it is loaded anywhere: "UTF-8 utf8 UTF-8"
- There are only a few special AddTypes in the .conf files most are loaded with the mime_module "TypesConfig conf/mime.types" which includes the above line "text/html html htm"
A few years ago I used Apache 2.0.X with "AddDefaultCharset utf-8". At that time this line changed the behavior in the way it seems to be the default now. But this behavior I don´t want any more, the HTTP header should only be "Content-Type: text/html"
- there are a httpd-languages.conf file with a line "AddCharset UTF-8 .utf8" but these are not included
- there are a charset.conv file which I don´t know if it is loaded anywhere: "UTF-8 utf8 UTF-8"
- There are only a few special AddTypes in the .conf files most are loaded with the mime_module "TypesConfig conf/mime.types" which includes the above line "text/html html htm"
A few years ago I used Apache 2.0.X with "AddDefaultCharset utf-8". At that time this line changed the behavior in the way it seems to be the default now. But this behavior I don´t want any more, the HTTP header should only be "Content-Type: text/html"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No helpfull comments here. Question doesn´t interest any more.
I think a good start is http://www.w3.org/International/O-HTTP-charset