Hi Folks,
Today I’m going to share some points on speeding up your website or blog. Normally we don’t like a website which has a long loading time. So how to reduce the loading time of our site:
- Compress Scripts: Scripts take the main role in increasing the loading time. And when the scripts are heavily commented & has a full formatting then it adds to the trouble. So if we compress the scripts by removing all the comments & removing the formatting then we can save some time. Following are some scripts compressors:
- Standard Code: Always code in the standard form defined & maintained by W3C. Since a standard code is quickly read by browsers & search engines. W3C provides the following validators to check whether the given document is according to the standard or not:
- Compress Images: Optimize graphics for web before using them. Images take a considerable amount of time & on compressing them saves a lot of time but sometimes compromises the quality. So CSS Sprites can be used which is basically making a single image after including all the graphics. Check YouTube’s CSS Sprite for better understanding.
- Read this article on A List Apart for understanding CSS Sprites. [LINK]
- CSS Sprite Generator
- Server Side Includes(PHP): Reduce server side inclusion of scripts to increase the processing speed. Insert HTML directly in the scripts rather than echoing them like in WordPress for displaying the title of blog <?php bloginfo(‘name’); ?> is used instead if we replace it with an echo simply write the title then we would decrease the loading time. Since we would change our blog’s name in a rare condition.
- Resizing Images: Never use a large image by simply setting its width & height rather resize the image to the desired dimensions & then use. Since in the both the case we are displaying the same image but in the first case it is having much larger size.
- Use CDN: CDN stands for content delivery network. It is really the most effective method to decrease load time. Most of the busy sites are using it. Popular CDN providers are Microsoft Azure, Amazon S3, Akamai, etc.
- Free CDN for WordPress Users : Coral CDN Plugin
These few points are highly effective & can reduce the page loading time to a considerable amount. So next when you’re building a website just keep this points in mind or if you’re planning to optimize your present site then also it’ll help you a lot. Do let me know about the results also share you views.
nice one.. image compressing using CSS is the most widely used technique
Thanks a lot Piyush 🙂 Yeah you’re right but for heavy sites we need to apply many more methods including this.
Good Article I liked the CSS Sprite method, Thank you.
I would also recommed to use caching the webpages on the server so the PHP doesn’t have to re-process every page, that should also help.