July 1, 2008

New blog style - SEO Javascript banner and optimization

Filed under: Wordpress — admin @ 3:45 am

From the desk of Samy,

As you may have apreciate, I’ve changed a few things of the blog.

Now, there are some google ads on each page. Maybe I can earn extra cash for blogging. Who knows!

Moreover, I’ve shortened the posts: the main page was too long and slow connections could result affected. I wanted to optimize that so now, there is a summary of each post and if you are interested in it, you can expand and read the whole post.

More changes: As you can see, I’ve got a banner. Yeah, I needed it but due to my incapability of using photoshop I hadn’t got a banner… yet. Ichi has created one for the blog. There was a problem, my blog has a CSS adapted to all screen resolutions. That is to say, the width of the page is not in pixels but in percentages (90%). So, I’ve calculated how many pixels would fill the banner in 1024×768 and in 1280×800 resolution and then, I’ve programmed a very simple javascript to switch from one banner to the other depending on which resolution have the readers. So, I’ve got two banners that are the same but have differents sizes. The smaller one is displayed when the reader has a 1024×768 resolution, and the bigger one when the reader has a 1280×800 resolution in order to fit perfectly in the blogpage header.

The code is this (as you can see, it’s very simple):

<script>
if (screen.width == 1280){

document.write(”<img src=’<?php bloginfo(’template_directory’); ?>/PATH/MyBiggerImage.jpg’ alt=’Banner Samy Blog! http://samyblog.890m.com’ /></div>”);
} else { // DEFAULT

document.write(”<img src=’<?php bloginfo(’template_directory’); ?>/PATH/MyLittleImage.jpg’ alt=’Banner Samy Blog! http://samyblog.890m.com’ /></div>”);
}
</script>

Another change: from now on, each interesting post will start with a summary and after that, I’ll start the post normally. So, the post will be like this:

Summary

From the desk of Samy, blablabla

End of the post

This is for SEO (Search Engine Optimization). I hope that all the changes will help a bit in order to achieve a better web positioning.

I think that this is all I wanted to write about today…I’ll try to update more often now that I’ve got more free time hehehe

…SaMy*^36

No Geek Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Cerrar
Enviar por Correo