W3C home > Mailing lists > Public > www-amaya@w3.org > January to March 2006

Re: document charset and Cache-Control: no-cache

From: Michael Teichgräber <mt@wmipf.in-berlin.de>
Date: Sat, 18 Feb 2006 18:30:37 +0100
To: Irene.Vatton@inrialpes.fr
Cc: www-amaya@w3.org
Message-ID: <87vevc8the.fsf@wmipf.in-berlin.de>

> Amaya implements the standard policy:
> 1. Charset given in HTTP header

My CGI program works that way, the header is

    Content-Type: text/html; charset=utf-8

and the documents are HTML 4.

The strange thing is, that the encoding in a certain case seems not to
be recognized by Amaya: If the CGI program declares an additional HTTP

    Cache-Control: no-cache

, charset information seems to be ignored: The document is displayed
using the iso-8859-1 charset, and the `Document Information' window
shows "Charset: Unknown".

Is this what I should expect, when I use the Cache-Control header?

I have attached an example CGI script. If the `X-' prefix is removed,
so that the Cache-Control header gets active, Amaya forgets about the 
`charset=utf-8', at least on my system.

#! /bin/sh


cat <<EOF
Content-Type: text/html; charset=$charset
X-Cache-Control: no-cache

<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
charset: $charset

Should be an \`a' with diaeresis:

printf "  \xc3\xa4\n"

cat <<EOF

Received on Saturday, 18 February 2006 18:08:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:30:50 UTC