Delivered HTTP charset for static html files

Posted on 2011-05-06
Last Modified: 2012-06-27

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/
LoadModule asis_module modules/
LoadModule auth_basic_module modules/
LoadModule authn_default_module modules/
LoadModule authn_file_module modules/
LoadModule authz_default_module modules/
LoadModule authz_groupfile_module modules/
LoadModule authz_host_module modules/
LoadModule authz_user_module modules/
LoadModule autoindex_module modules/
LoadModule dir_module modules/
LoadModule env_module modules/
LoadModule include_module modules/
LoadModule isapi_module modules/
LoadModule log_config_module modules/
LoadModule mime_module modules/
LoadModule negotiation_module modules/
LoadModule setenvif_module modules/
LoadModule ssl_module modules/
LoadModule status_module modules/

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
Question by:maxworx
    LVL 14

    Expert Comment

    Do you have an AddCharset directive? Or AddType?

    I think a good start is

    LVL 1

    Author Comment

    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"
    LVL 1

    Accepted Solution

    No idea?
    Need more infos? Should I upload all apache config files?
    LVL 1

    Author Closing Comment

    No helpfull comments here. Question doesn´t interest any more.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now