Showing posts with label optimisation. Show all posts
Showing posts with label optimisation. Show all posts

Saturday, April 9, 2011

Optimizing your page to come up in Google search

Hi,

This is a continuation of my previous post. In this I will be highlighting few generic rules making your web page appreciable to search engine. The search is basically performed on keywords. Such as "PHP Books", where PHP and Books are two different keyword. You need to architect your website in such a way that these two keywords in your page makes sense to Google.

Here are 10 ways how and where you will use those keywords and optimizing your web page:

1. In META keywords. Not necessary but a good practice. Keep them short and max till 255 characters

2. In META description. Keep the keywords towards the left, but forming a complete meaningful sentence.

3. In the page title. In extreme left, but not the first word.

4. In a H3 tag or higher. Use only once H1 tag in a page and multiple H2, H3 etc. as needed

5. In page URL. Do not duplicate the keywords in URL. Try to use .html or .htm in URL's to be on the safe side. You can use .htacces to convert your .php or .aspx files look like .html/.htm files.

Wednesday, March 9, 2011

Performance Optimization - Part 2

Hi,

In my pervious post I had explained few reasons of slow server response time along with its solution. In this I will discuss how even after the response is received from the server, the page tend to load in the browser slowly. Following can be the reasons for that:


1. Heavy CSS and Javascript files
2. Too many images
3. Extensive DHTML processing loops


1. Heavy CSS and Javascript files
Sometimes using too many javascript libraries increases the size of Javascripts resulting in slow page. The best solution for this is choosing the Javascript framework smartly. If you are using common layout for multiple pages, then put only those JS files in the layout which will be common to all pages e.g. jquery.js. If you are using a package which is used only in few pages and not all, then do not put those in the layout, instead put them indivisually in each page e.g. the google map js.

Second and probably the best way to optimize JS and CSS usage is by JS/CSS compression. If you use gzip compression for CSS and Javascript, on an average it reduces the size by 80%, which really boosts up the speed. Click here to view my article on JS/CSS compression. It is really easy and extremely effective.

Install firebug in your Mozilla browser to analyze the above.

2. Too many images


Tuesday, March 8, 2011

Performance Optimization

Hi folks,

Improving the performance of a website has haunted the programmers for a long long time. In this post I would try to make it a little easy. But before you could start making super fast websites, you need to know how page request and response takes place. Because code might not be the only culprit in every case for slow websites.

Here are few reasons which might result in slow websites:

1. SQL Queries
2. Non indexed database tables
3. API calls in looping sequences

The above reasons will result in slow response from the server. During this you will keep on seeing "waiting for www.yoursite.com" in the status bar of your browser for a long time.

Finally, when the "waiting.." stage is over but still the actual page takes time to get downloaded in the browser, then following might be the reason:

4. Heavy CSS and Javascript files
5. Too many images
6. Extensive DHTML processing loops

In this post I will discuss the 1st three points, remaining I will discuss in future posts. So coming to our first point: