Randomly the mime-type of my .css files changes from text/css to text/plain.
Immediately after a restart, the mime-type is sent correctly. I used Rex Swain's HTTP Viewer to inspect the headers, and immediately after a reset I see: Content-Type: text/css If I wait awhile and reload the page, I see: Content-Type: text/plain; charset=UTF-8 The pages are not displayed correctly by the browser. Googling I get a huge number of hits, but the vast majority are about misconfigurations, where the server never sends the correct mime-type. Since this works correctly after a restart, I do not believe that it is a configuration error. However, I have checked the configuration carefully and even added a .htaccess with an AddType text/css .css There were a number of php and tiki forums discussing identical problems, but there were never any resolutions - the problems just mysteriously went away or the posters gave up. There were a couple of similar bugs reported against caching, but they are shown as being fixed. I did try disabling caching, but it did not seem to help. I did recently add charset=utf-8 to the content-type meta tag of the index page. Removing it did not seem to help I am running Apache/2.0.59 on SuSE linux 10.2. The css is included with: <link href="myfile.css" rel="stylesheet" type="text/css" /> the DOCTYPE is xhtml1-strict ------- Output from Rex Swain's HTTP Viewer : After restart of the Apache server: HTTP/1.1·200·OK(CR)(LF) Date:·Fri,·23·Mar·2007·14:01:13·GMT(CR)(LF) Server:·Apache/2.0.59·(Unix)·mod_ssl/2.0.59·OpenSSL/0.9.8d·PHP/51.4·Mo d_Rexx/2.1.0(CR)(LF) Last-Modified:·Thu,·22·Mar·2007·15:43:12·GMT(CR)(LF) ETag:·"12c5dca-ed3-cbe52400"(CR)(LF) Accept-Ranges:·bytes(CR)(LF) Content-Length:·3795(CR)(LF) Cache-Control:·max-age=604800(CR)(LF) Expires:·Fri,·30·Mar·2007·14:01:13·GMT(CR)(LF) MTSpecial:·D=796·t=1174658473821118(CR)(LF) Connection:·close(CR)(LF) Content-Type:·text/css(CR)(LF) Content-Language:·en(CR)(LF) (CR)(LF) After reloading page: HTTP/1.1·200·OK(CR)(LF) Date:·Fri,·23·Mar·2007·14:02:04·GMT(CR)(LF) Server:·Apache/2.0.59·(Unix)·mod_ssl/2.0.59·OpenSSL/0.9.8d·PHP/51.4·Mo d_Rexx/2.1.0(CR)(LF) Content-Type:·text/plain;·charset=UTF-8(CR)(LF) Last-Modified:·Thu,·22·Mar·2007·15:43:12·GMT(CR)(LF) ETag:·"12c5dca-ed3-cbe52400"(CR)(LF) Accept-Ranges:·bytes(CR)(LF) Content-Length:·3795(CR)(LF) Cache-Control:·max-age=604800(CR)(LF) Expires:·Fri,·30·Mar·2007·14:01:13·GMT(CR)(LF) Age:·50(CR)(LF) MTSpecial:·D=124·t=1174658524001488(CR)(LF) Connection:·close(CR)(LF) (CR)(LF) ---- I note that the Content-Type has moved, the charset has been appended, and the Content-Language has been dropped As an unexplicable note, the Content-Type header displays correctly if inspected with WANNA Browser. HTTP/1.1 200 OK Date: Fri, 23 Mar 2007 14:19:23 GMT Server: Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8d PHP/5.1.4 Mod_Rexx/2.1.0 Last-Modified: Thu, 22 Mar 2007 15:43:12 GMT ETag: "12c5dca-ed3-cbe52400" Accept-Ranges: bytes Content-Length: 3795 Cache-Control: max-age=604800 Expires: Fri, 30 Mar 2007 14:19:23 GMT MTSpecial: D=197 t=1174659563564311 Content-Type: text/css Content-Language: en I ran the pages through the W3 validation server and corrected all of the errors and warnings. I am at a complete loss. ..don support (at) microtechniques.com
