The loading speed of your web pages is the most crucial part of a website’s usability and SEO. Google considers page speed to be one of the 200 ranking factors that influence a website’s position in SERPs – it’s also known as a correlation with bounce rates, conversions, and the overall user experience .
With numerous other websites in your market, the competition to earn web traffic and keep people engaged with rich content and great usability is growing each day. If your website does not load quickly, chances are you will lose site visitors to your competition in a matter of seconds.
Here are 20 quick tips aimed at optimizing your website’s load time:
The images on your site take up a lot of page size and can heavily affect its load time. It’s not enough to downsize your site’s images in the HTML editor because that only changes the appearance of the image in the front-end and not its actual size. Use external picture editor tools to resize the images, such as Adobe Photoshop.
A few tools to help you optimize your site’s images:
Image File Format
Stick to standard image formats such as JPG, PNG and GIF.
Some sites may need stylized text to make the web page look attractive. However, remember that text in the form of an image can take up a lot of the web page size and is of no use for SEO. It is thus ideal to use text styles in CSS and keep everything in text format instead.
A site that requires plugins may slow your page loading speed. Not all plugins are unnecessary. For example, social share plugins which are a must-have for every site these days. That said, always check to see if there is a better alternative to the plugin, for example, using a CMS with in-built social plugins.
Every time a visitor loads a site, your web page’s image files, CSS and Java files load as well, thus taking up a lot of page load time. When you use the HTTP caching system on your website it allows these file resources to be cached or saved by the browser or proxy.
On repeated page loads these files can be retrieved from the cached files rather than downloading them all over again from the network. Moreover, by optimizing the caching system of your website you also tend to reduce the bandwidth and hosting costs on your site.
Avoiding redirects increases serving speed. Some redirects are unavoidable and need to be in place but you must remember that this requires an additional HTTP which increases the page load time.
Check for broken links and fix them immediately.
Reduce DNS Lookups
Domain Name System Lookup occurs when a URL (hostname) is typed in a browser and a DNS resolver returns that server’s IP address. The time needed for this process is around 20 – 120 milliseconds, however, multiple hostnames can be used for various elements on a website, which includes the URL, images, script files, style sheets and flash elements.
With multiple unique hostnames the DNS lookup also increases, which then increases the page load time. Reducing the number of unique host names will reduce the number of parallel downloads, which may increase the page loading time. It is thus ideal to use one host when you have less than six resources.
You can also use URL paths instead of hostnames. This means that if you have a blog page that is hosted on blog.yoursite.com, you can instead host it on www.yoursite.com/blog.
Unnecessary CSS and HTML
Lighten the code of your website by removing any HTML or CSS that is not required. If your site is built on a CMS, chances are you have pre-installed CSS class and id ‘stubs’ that help design the theme. Remove unused class and ID declarations or combine multiple declarations into one.
Multiple Tracking Scripts
While it is wise to keep tabs on your website’s traffic stats, it is not advisable to use multiple tracking softwares as this may hinder the page load time. If you are using a CMS such as WordPress, you could allow WP stats to run scripts on your page or Google Analytics, but never both. E-commerce shopping cart CMS tend to have their own default tracking script which cannot be deleted when you use Google Analytics instead.
Similar to files on your PC that are zipped and compressed to reduce the total size during online file transfers, heavy files on your website can be zipped with something called the G-Zip Compression. This saves bandwidth and download time and most of all reduces your page loading speed. You should configure the server so that it returns zipped content.
Reduce HTTP Requests
CSS Sprites can reduce the number of image requests. Combine background images into a single image by using CSS background-image and background-position elements. Combine inline images into your cached stylesheets. HTTP requests are multiplied when there are duplicate scripts in the code so ensure that you identify and remove these duplicate scripts.
To keep duplication under control use Script tag on your HTML page, as shown in the example below:
You may use an insertScript function in your PHP page, as shown in this example:
php insertScript(“menu.js”) ?>
Expires or Cache-Control Headers
You can use Expires headers for static components of the site and Cache-Control headers for dynamic ones. Using these headers makes the various components of a site, including images, stylesheets, scripts and flash, cacheable. This in turn minimizes HTTP requests and thus improves the page load time.
With the use of Expires headers you can actually control the length of time that components of a web page can be cached, as shown in the example below:
Expires: Wed, 20 Apr 2015 20:00:00 GMT
If your server is Apache you can set the time for cached content by using the ExpiresDefault directive. This sets the expiration date as a certain number of years from the current date:
ExpiresDefault “access plus 15 years”
Style Sheets at the Top of Documents:
It is standard practice to place style sheets at the top of a document. The page elements that are rendered from the server open progressively in your browser as initiated by these style elements.
From the navigation bar and logo to the page content, the visual progression of a loading website gives rich user experience, even if a user has a slow internet connection. Style sheets also improve the page load time.
Minification is the process of removing unused characters from the code which helps to reduce its size and the subsequent loading time. Two such tools available online…
GET Requests over POST
It is found that using the html ‘METHOD’ attribute GET processes data much faster than POST when requesting data on a browser. Although both HTTP methods achieve the same result, POST sends the header first and then sends the data while GET takes only one TCP packet to send data. Also, GET is recommended for AJAX requests as it can be cached and remains in the browser history.
The data stored in cookies is exchanged between servers and browsers. Hence, by reducing the size of the cookies you reduce the size of the data that is transferred and increase the page load time. Eliminate unnecessary cookies and set your Expires date to a sooner time period, or provide no Expires date at all to reduce the size of the cookies.
If you are using a CMS such as WordPress it is recommended to check frequently for updates in the software but do not load these on a live website. First carry out upgrades on a separate server to test them. Keeping abreast of software updates also improves a site’s speed.
What did I miss?