Mozilla's javascript console show the following warning while IEdoesn't show it?

B

Bernard

Hi Nick,

that is because the web server that served the style sheet file does
not have a mime type "text/css" configured.

Such a configuration would enable the web server to set this mime type
header depending on the file extension of the file.

Bernard
 
N

nick

Bernard said:
Hi Nick,

that is because the web server that served the style sheet file does
not have a mime type "text/css" configured.

Such a configuration would enable the web server to set this mime type
header depending on the file extension of the file.

Bernard
Thanks, looks the script works. any serious problem if don't config it?
 
G

Grant Wagner

nick said:
Thanks, looks the script works. any serious problem if don't config it?

The MIME type sent by your server to a browser for files ending in .CSS won't
affect your script. However, everyone who visits your Web site will get
warnings in Gecko-based browsers everytime you include a file that ends in
..CSS on a Web page. If you have control over the server, fix it. For example,
to fix it in apache, ensure:

"text/css css"

exists in "mime.types" (should be found in the same directory as httpd.conf).
Of course, you also have to ensure apache is using mod_mime and httpd.conf is
using the right mime.types:

<IfModule mod_mime.c>
# your path will/may vary
TypesConfig /usr/local/etc/apache/mime.types
</IfModule>

Pretty much every reasonable default build of apache should come with this
stuff configured as shown above, unless you somehow managed to build apache
without mod_mime or you moved or edited mime.types.

To add/modify MIME types in IIS 4 and 5, this URL seems to provide the
details:

<url:
http://www.microsoft.com/technet/pr...ogies/iis/maintain/featusability/mimeiis.mspx
/>

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top