Hi Eric
It is advisable, though not necessary, to keep structure (HTML), style (CSS) and behavior (JavaScript) separate from each other, wherever practical. (In fact,
Michael Wallent, Lead Program Manager at Microsoft, when the article linked to was published, suggests
going a step further and separating content as well.) Bearing this in mind, consider replacing
Code:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
with
Code:
<script type="text/javascript" src="googleAnalyse1.js"></script>
and putting
Code:
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
into a separate JavaScript file named
googleAnalyse1.js
Please note: Just like how your
mystyles.css file contains neither “<style media="screen" type="text/css">” nor “</style>”,
googleAnalyse1.js should have
just the script itself, as I’ve shown above, and
nothing else!
Now, do the same thing with
Code:
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8160150-1");
pageTracker._trackPageview();
} catch(err) {}</script>
but give the file it links to a unique name like
googleAnalyse2.js or whatever you feel is appropriate.
To keep things organized, place both
googleAnalyse1.js and
googleAnalyse2.js into a folder named
javascript, and
mystyles.css into one called
css. That will keep things from getting messy as you add more style sheets and JavaScript snippets to your site.
For the time being, don’t worry about separating content. I just think Mr Wallent’s article is rather interesting and actually makes a lot of sense when you think about it.
On another matter, where you have
Code:
<img style="width: 309px; height: 263px" title="" alt="" width="309" height="263" src="http://www.v7n.com/forums/images/100_0916.jpg" />
and other image related markup, it is neither necessary nor desirable to use inline CSS as the dimensions are already declared (
width="309" and height="263" instructs browsers to display that image 309 pixels wide by 263 pixels high.)
Lastly, would you not rather have the site centered like
this? Just curious.
I know none of the above relates to SEO optimization (at least, not to my knowledge) but it’s worth considering nevertheless.
Cheers,
~ Wayne