Speed up website

 

In search engine fastest website rank higher than the slowest website. Here is the best tool for test your website speed performance:

  1. Google Page Speed Insights
  2. Pingdom Website Speed Test
  3. GTmetrix

Rate your website with your website load time:

Below 1 second = perfect
1-3 seconds = above average
3-7 seconds = average
7+ seconds = very poor

If your website is too slow, Below are 10 ways to speed up website performance:

#1 Leverage browser caching

If you want to speed up your website, At first you need to enable leverage browser caching on your website. Every time a browser loads a webpage it has to download all the web files to properly display the page. This includes all the HTML, CSS, JavaScript and images. Browser caching can help by storing some of these files locally in the user’s browser. Their first visit to your site will take the same time to load. However, when that user revisits your website, refreshes the page, or even moves to a different page of your site, they already have some of the files they need locally.

This means the amount of data the user’s browser has to download is less, and fewer requests need to be made to your server. The result? Decreased page load times. You can install the following plugin to enable leverage browser caching on your WordPress website.

Or you can manually enable browser cache in your website, add the following line in your website .htaccess file

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

 

#2 Optimize Image

Images are larger in size which means they take longer time to load and can slow down your website. To speed up your website, you need to optimize image of your website. The best way to compress your website image by using Photoshop or other image editing software before you upload the image to WordPress. If you aren’t comfortable working with image editing software, you can easily compress your website image using TinyPNG.com.

TinyPNG

If you are using WordPress, there are several image compression plugins that can help you to optimize your website image.These plugins optimize your images by automatically compressing them. You can install the following plugins to optimize your WordPress website image:

#3 Enable Gzip Compression

Gzip Compression is a simple method for compressing your website’s files to save bandwidth and speed up your website.If you enable gzip compresses on your website, this can reduce the size of pages by up to 70%. Since 90% of Internet traffic travels through browsers that support Gzip, it’s a great option for speed up your website.

Gzip compression

You can enable Gzip Compression by adding the following code to your .htaccess file:

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>

Or, you can use following php code to enable Gzip Compression to your website:

<?php 
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); 
else ob_start(); 
?>

If you are using WordPress, you can use WP fastest cache plugin to enable Gzip compression.

To check your website Gzip is enabled or not, you can use Checkgzipcompression.com.

 

#4 Minify your CSS and JS files

If your website uses a lot of JavaScript and CSS code, it’s slow down your website. Minifying a file involves removing HTML comments, whitespaces and empty elements from code will decrease your page size, reduce network latency and speed up load time. To speed up your website you need to minify your website Javascript and CSS code.

You can use Minifier.org online tools to minify your CSS and Javascript code.If you are using WordPress, You can use following plugins:

#5 Optimize Your Database

Optimizing your website database cleans up unwanted data which reduces database size and improves performance.You can speed up your website by regularly cleaning up your database. It is always a good idea to keep your databases’ tables optimized. If you are using WordPress you can install WP-Optimize plugins to automatically optimize your website database.

or You can optimize your website database using phpMyAdmin. Go to your website database from phpMyAdmin. Then you need to check the box for Check All / Check tables having overhead and choose Optimize Table from the drop-down menu.

optimize-database

After you’ve optimized your database you’ll most likely notice that the size of your database has decreased–this is a good thing.

#6 Enable Keep-Alive

HTTP Keep-Alive or HTTP persistent connections allow the same TCP connection to send and receive multiple HTTP requests and it helps to reduce the latency for subsequent requests.

Enabling Keep-Alive connections in Apache

Apache enables Keep-Alive connections by default. If Keep-Alive is not enabled, you can turn them on by adding the following line to your web server httpd.conf file.

KeepAlive On

If your website is running on a shared hosting, you probably won’t have access to httpd.conf . So you need to contact your hosting provider to enable Keep-Alive Or You can try following method.

Enable keep-alive using .htaccess

If you don’t have access to your web server config file you can enable keep-alive yourself using an .htaccess file.

<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>

#7 Avoid bad requests

Broken links result in 404/410 errors. Too Broken links inside your content affect your website speed. These are wasteful, unnecessary requests can make a bad user experience and make your site look unprofessional. If you want to speed up your website, always to fix your website broken links. You should scan your website broken links using Online Broken Link checker or Google Webmaster tools for free.

You can easily fix your WordPress broken link using Redirection plugin.

#8 Remove Unnecessary Plugins and Add-ons

Plugins and Add-ons can extend functionality or add new features to your websites. But unnecessary plugins and add-ons can slow down your website. If you are CMS link WordPress, Joomla or Drupal, you need to pay attention to them. A lot of crappy plugins add extra database queries, scripts and styles to every page on your website. So do not install unnecessary plugins and add-ons on your website.

In your WordPress website, you can install P3 (Plugin Performance Profiler) Plugin. This plugin will scan all of your WordPress plugins and It will give you a report so that you can see which plugin reduce your website load time.

 

#9 Use CDN (Content Delivery Network)

If your website hosted in the US, This website will be faster for the people of US but your website will be slower for the people from countries. A CDN solves this problem by distributing your website files to across a network of servers in different locations of the world. So that someone trying to visit your website from Bangladesh will get download your website content from a closer server. This will significantly increase your website speed. CDN can increase website speed by up to 60%.

Here is the list of best CDN provider:

LEAVE A REPLY

Please enter your comment!
Please enter your name here