Website download time is very important to attract your first time visitors. Many webmasters won’t consider improving their site download time. Always the faster downloading sites would have an advantage. Slow loading websites frustrate visitors. Frustrated visitors look elsewhere for their needs. They will either back click or close the search altogether and then visit your competition, so analyze and improve your Site/page download time.
Test your site speed :
- Page Speed – an open source Firefox/Firebug add-on that evaluates the performance of web pages and gives suggestions for improvement.
- YSlow – free tool from Yahoo! that suggests ways to improve website speed.
- WebPagetest – shows a waterfall view of your pages’ load performance plus an optimization checklist.
Site download time can be improved by the following methods.
Compress web pages using Gzip
Compressing web pages is a simple and an effective way to save bandwidth and speed up your site. The HTML portion of web pages may go from 101kb to 15kb after compression.
The “Content-Encoding”/”Accept-Encoding” and “Transfer-Encoding”/”TE” headers in HTTP/1.1 allow clients to optionally receive compressed HTTP responses and (less commonly) to send compressed requests. The browser sends a header telling the server it accepts compressed content : Accept-Encoding: gzip. The server sends a response if the content is actually compressed: Content-Encoding: gzip. The browser could download the zipped file, extract it, and then show it to user.
The specification for HTTP/1.1 specifies three compression methods:
gzip – the content wrapped in a gzip stream.
deflate – the content wrapped in a zlib-formatted stream.
compress – The encoding format produced by the common UNIX file compression program “compress”.
Many client libraries, browsers, and server platforms (including Apache and Microsoft IIS) support gzip. The methods to enable gzip compression for web pages are explained below.
Enabling gzip compression for web pages
There are two methods by which gzip compression can be enabled for web pages.
By editing your .htaccess file
Add the following code to the .htaccess file at the root directory of your website.
# compress all text & html:
AddOutputFilterByType GZIP text/html text/plain text/xml
# Or, compress certain file types by extension:
<Files *.html>
SetOutputFilter GZIP
</Files>
Add the php code
For php files or if you don’t have access to .htaccess file, add the following line to the starting of your php file.
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
ob_start("ob_gzhandler"); else ob_start(); ?>
Verify whether your web page uses Gzip compression
To verify whether your web server is returning compressed files, visit http://www.gidnetwork.com/tools/gzip-test.php
Eg. http://hostingnewbies.com uses Gzip compression.
Combine external files
The external JavaScript and CSS files that are included in your web pages will increase your site download time. Try to combine those files and have minimum number of JavaScript or CSS files to reduce your site download time.
Minimize DNS lookups
The DNS lookup for many sites will increase your site downloading speed. So reduce including files such as javascript, CSS, images, videos etc from other sites to your web page.
Recent Comments