I decided to share with you some tips if you want to improve the speed of your website. I think these ones especially might be helpful, as nowadays website speed matters more than ever. Let’s begin:

Compressed images

Compressing images requires its own strategy for every website, but here are some simple rules to follow:

  1. Never 100% jpeg quality in web
  2. PNG is hard to compress, avoid it for web applications! If you still need though, you might want to take a look at compressor.io or TinyPNG
  3. SVG – Use it as often as possible, there is even svg.gz compressed format which makes it even smaller.

In general, using 100% jpeg quality is not recommended for web applications. Since srcset=”” html tag exists, this makes it easier to have compressed jpeg images for the right user resolution (responsiveness baby!)

When it comes to PNG image format, I personally avoid it using for web, because of it’s weak compression ability. There might be some exceptions, because of the alpha channel (transparency) it provides, but still, avoid it as much as possible.

Template images, logos and other image assets, should be in SVG format if possible. This allows you not only to have really scalable vector graphic (which you can modify as you wish with CSS & JS), but compressing it with gzip (.svg.gz) makes things even faster.

Optimize your server

Still using Apache 2.0 with PHP 5.6? Really? Google some new trends, and migrate to at least nginx + php7.0/1. I avoid using apache (though it has some really useful modules), but in my personal opinion and experience, nginx has always won. Also if you have the possibility, use HTTP2.0 (requires SSL), because this is a new version of the protocol which also improves the speed of your website a lot.

Cache baby!

A really good cache strategy is needed to make your website fast for mobile and desktop. After avoiding to have 87242 external javascript files, make sure you have the right browser cache settings. It makes no sense that a user downloads the image every time he visits the website, if the image remains the same! Same thing for all javascript and css files. Use http etag for example and save your users some resources. If you are using the PHP and nginx combo, you might want to take a look at the fastcgi_cache config and the Memcache module for PHP.

That’s all folks, I think after following these 3 simple rules, you should achieve a really fast website, at least faster than before. Let me know what you think by commenting below.

Share This Story!

Loading Facebook Comments ...