[thelist] Site Review - http://wizardev.ca/ (Safari Problems?)

James Hardy evolt at weeb.biz
Fri Jun 3 11:46:02 CDT 2005


Kasimir K wrote:

> Michele Foster - WizarDev scribeva in 2005-06-03 15:56:
>
>> Anyone else?   Any suggestions on fixing it?  Do I maybe need to 
>> change the
>> order in which files are called? Here is the relevant code in the 
>> head tag.
>>
>> <meta http-equiv="Content-Script-Type" content="text/javascript" />
>> <meta http-equiv="Content-Style-Type" content="text/css" />
>
>
> Just wondering why you would need the above <meta>s? Isn't it the 
> servers job to tell the content type? Which it btw tells ok for css: 
> Content-Type: text/css
> For javascript it tells: Content-Type: application/x-javascript
>
> .k

That is actually the right thing to do. It is not to tell the browser 
about imported stylse sheet/ scripting blocks, or embedded block of 
style/script, but for the event attributes and inline styles.

eg in the tag <span onclick="alert('fred');" 
style="background-color:red"> those two meta statements let the browser 
know that alert('fred'); is javaScript and not VBScript or Python and 
that background-color:red should be treated as Cascading Style Sheet 
rules rather than XSL, DSSSL, JSS or some other exotic style language.

While the de-facto defaults in pretty much all browsers for those are 
text/javascript and text/css it doesn't hurt to add them in.



More information about the thelist mailing list