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:
Compressing images requires its own strategy for every website, but here are some simple rules to follow:
- Never 100% jpeg quality in web
- 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
- 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.
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.