Improving site speed not only improves visitor satisfaction but it also has a direct influence on your search rankings.
In fact, site speed is one of over 200 indicators that impacts search rankings confirmed by Google.
According to Akamai:
- 47% of people expect a web page to load in two seconds or less.
- 40% will abandon a web page if it takes more than three seconds to load.
- 52% of online shoppers say quick page loads are important for their loyalty to a site.
This blog provides some tips for you to decrease your site load time.
Minimize HTTP Requests
How long it takes for a website to load is directly related to the requests made on the server to load the website.
A website will be slow if there are too many HTTP request made to the server since it takes a long time for elements to render.
Examples of HTTP requests are images, stylesheets, scripts, Flash, etc.
That being the case, simplify the website design would be the easiest way to improve the load time.
- Streamline the number of elements on your page
- Combine images into CSS sprites whenever possible
- Compress images, HTML, CSS, and JavaScript
- Move Javascript files to the footer
Enable caching
If you have many web pages that do not change a lot, enabling caching will drastically improve the load time of your website.
When you visit a web page for the first time, your browser needs to request all the images, text, scripts, etc. from the website’s server.
The browser can cache these resources so it can load the page without sending another HTTP request the next time you visit the site.
A week is a reasonable cache lifetime for static contents.
For widgets and advertisements from third parties, a cache lifetime of at least one day should be set.
As time goes by, you can slowly increase the cache lifetime for all the resources that can be cached.
Make sure that you enable KeepAlive
What HTTP KeepAlive feature does is to keep TCP connections alive and reduce the latency for later requests.
So contact your hosting provider to make sure KeepAlive is activated.
If you have access to your httpd.conf file, enable KeepAlive by making sure that you have “KeepAlive On” in it,
otherwise just add the following piece of code at your .htaccess file.
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
Optimize your database
If your website is driven by databases like WordPress, optimizing your database can help with the load time.
Your database can impact your page speed.
You can optimize the database and decrease page load time by adding an index.
Slow queries should be logged and investigated.
If your website is hosted on a VPS or dedicated server, query caching can help decrease the load time.
Minimize redirects
Sometimes to indicate the new location of a URL or reserve multiple domain names, you need to redirect users from one URL to another.
Redirects create additional HTTP requests and increase load time.
You should have as few redirects as possible.