note 79004 added to function.header
| From: | Aleks at osu1 dot php dot net | Date: | Wed, 07 Nov 2007 01:06:48 +0000 |
| Subject: | note 79004 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132052@lists.php.net to get a copy of this message | ||
I recently had a hair-threatening problem with Firefox and XHTML 1.0 transitional.
It worked fine with other browsers, and also with HTML 4.1.
To cut a long story short, PHP-generated JS and CSS files were still being reported by the headers
as text/html, while in the HTML they were text/css and application/javascript; Firefox having been
told the page was XHTML 1.0 became anal-retentive and refused to style the page. (I think the JS
still worked but I fixed it anyway.)
Solution:
header('Content-type: text/css');
and
header('Content-type: application/javascript');
----
Server IP: 203.202.10.60
Probable Submitter: 220.245.178.141 (proxied: 60.242.27.57)
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/79004
Del: integrated -- https://master.php.net/note/delete/79004/integrated
Del: useless -- https://master.php.net/note/delete/79004/useless
Del: bad code -- https://master.php.net/note/delete/79004/bad+code
Del: spam -- https://master.php.net/note/delete/79004/spam
Del: non-english -- https://master.php.net/note/delete/79004/non-english
Del: in docs -- https://master.php.net/note/delete/79004/in+docs
Del: other reasons-- https://master.php.net/note/delete/79004
Reject -- https://master.php.net/note/reject/79004
Search -- https://master.php.net/manage/user-notes.php