Click to See Complete Forum and Search --> : http-equiv ... charset=
Someone showed me some lovely code, a day or two ago.
It included a line http-equiv for charset=
but also - and that's what caught my eye -
some http-equivs for type= "text/css" and type="text/javascript".
Those lines appealed to a lazy man like me.
Any volunteers?
JimJ
holyhttp
03-29-2007, 01:53 PM
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
WebJoel
03-29-2007, 04:28 PM
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
prepares browsers for what is to come I guess (??). It's in my template-generator.
Below: my most bullet-proof (but never-yet-perfect!) template:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title></title>
<style type="text/css">
* {border:0; padding:0; margin:0;}/* Set everything to "zero" */
body {min-height:100%; height:101%;
font:x-small Arial, Verdana, sans-serif;
voice-family: "\"}\"";voice-family:inherit;
font-size:small;/*for IE 5.5 */
} html>body {font-size:small;}
/*font-size: small; voice-family: "\"}\"";
voice-family: inherit; font-size: medium;*/} /* Assist IE rendering height, keyword-font sizes, etc. */
p {font-size: 90%; line-height:1.2em; margin-top:10px;}
h1, h2, h3, h4, h5, h6 {font-family: 'times new roman', arial, verdana, serif; background-color:none;
font-style:normal; font-variant:normal; font-weight:normal; margin:11px 0 0 10px;}
h1{font-size: 1.93em; margin-top:12px;}
h2{font-size: 1.72em; margin-top:12px;}
h3{font-size: 1.52em; margin-top:12px;}
h4{font-size: 1.42em; margin-top:12px;}
h5{font-size: 1.32em; margin-top:12px;}
h6{font-size: 1.21em; margin-top:12px;}
</style>
<script type="text/javascript"><!--
// -->
</script>
<link rel="shortcut icon" href="favicon.ico"><!-- path to your favicon -->
</head>
<body>
</body>
</html>
Thanks, WebJoel,
That's exactly what I was looking for.
I must have spotted it on another of your replies.
Many thanks,
JimJ
Maybe I should not have been so pleased.
I've discovered since that meta tags are not such a good thing.
Apparently they were provided, not for the benefit of developers,
but for search-engines. But then they abused so much that search-engines have stopped using them. We are now advised not to use them ! ! !
http://www.webmarketingnow.com/tips/meta-tags-uncovered.html#content-script
However, I'm still feeling lazy. So perhaps I'll continue to use them.
JimJ
WebJoel
04-03-2007, 07:29 AM
If used correctly with humility and succinct message, -I see no problem. It's those sites that stuff a hundred or two repetative phrases into a META tag that they think will boost their ranking. A sentence or maybe two short sentences should suffice for description=""
but I have built sites that indexed just fine without using META beyond the basic that my template has.
Interesting article. -They do not seem to have any real recommendation except for 'do not use', huh? :cool: