Today website speed required more than ever before!
As average internet connection speeds increasing every day around the world, web users are looking for fast load websites, they don’t want to wait for a second. At the same time, Google has stated give more priority to fast websites with higher positions in the natural search results.
So if you looking for increase your website speed and you need to make site speed a priority on your site.
then you can use below tips will be help you.
1. Minimize HTTP Requests
This is very important part of your website speed because of according to Yahoo, 80% of a Web page’s load time is spent downloading the different pieces-parts of the page: images, stylesheets, scripts, Flash, etc. Do you know HTTP request is made for each one of these elements, so if you are using more style files, scripts, images then automatically your website will be slow. You should mind it.
1. As possible use CSS code instead of images.
2. Combine multiple style sheets into one style.
3. Reduce scripts files and put them at the bottom of the page or inside the (footer.php).
4. Always remember, when it comes to your website, leaner is better.
2. Reduce server response time
Make sure your website server response time is less than or near by 200ms (milliseconds). Server response time is very important because of if your website server respond in 3 second means your website already 3 second slow then it will be start to load your script.
your can check your website server response time using Google’s PageSpeed Tools.
3. Specify a character set
Specify a character set in HTTP headers to speed up browser rendering. This is done by adding a simple piece of code into your header:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Note: Some CMSs use functions for character set (like WordPress with <!–?php bloginfo(‘charset’); ?–> ). I suggest that if you are sure about your character set, write it instead of using PHP functions. It helps to minimize request size, so try to use HTML instead of PHP everywhere that is possible.
4. Avoid Broken Links (404) requests
Broken links result in 404/410 errors. These cause wasteful requests. Fix your broken URLs (pay special attention to images). Use online broken link checker or use WordPress link checker for free. You can also read about Xenu Link Sleuth and Screaming Frog tools at SEOmoz that can be really helpful.
5. Turn on Gzip compression
Gzip compression is a technology that minimizes the size of browser-based HTTP responses. Using Gzip compression you can speed up your website load times.
There are two ways to turn on Gzip compression on your site.
1. Add the following code inside .htaccess file:
2. Add the following code to the top of your HTML or PHP page:
<?php if (substr_count($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start(); ?>
6. Optimize images
Images can contain extra comments and use useless image size. Keeping image sizes to a minimum that will help for users on slow connections. If you using oversize image that will make bad experience for users. Always try to save in JPEG format.
7. Use image as a background instant of use image tag
Yes as possible if you can use image as a background then you can also increase the speed of web page. For example:
If you using 10 image using <?img /> tag your webpage send 10 time http request to server and if you use all 10 images as a background using css then webpage will send http request only once with css and load all image.