.
Hello guys, how are you? Pokemaobr here again for another article for our dear Web Host blog. Today’s topic is very important for you develop websites in your day to day and sometimes you don’t even know how to measure when you are performing well in relation to performance and when your site is slow, and what you can do to improve.
When we talk about performance, several variables come into play, from the type of hosting your site is on. I particularly recommend a Web Host VPS to leave your site in a dedicated environment and that will greatly reduce latency, since the servers are in Brazil. Even the type of extension your image files are using and their size. But, let’s talk about that in the article.
First, we need to know How is our website performing?. For that, I recommend Google’s PageSpeed Insights https://pagespeed.web.dev/, it is possible to analyze a site and see what can be improved. For example, I put https://pokemaobr.dev to check how my site is performing.
The cool thing about this feature is that you will see that the performance is different for mobile and desktop. It gives you the response time of the site and some things you can improve. In addition to giving a score from 0 to 100 on performance.
Only with this tool it is possible to verify some bottlenecks that your website faces and correct them so that its performance improves.
Other tools like: Lighthouse, Gmetrix and Pingdom can also be used to scan your site and check the response time, beyond what can be adjusted. Some adjustments can be made right away to improve your site’s performance.
compress what you can
Using compression models such as gzip in the source files of your site helps to load smaller files and with that it is possible to save some good bytes of traffic when they are access your website.
In addition, minifying what can be minified and using the minified version of libraries and frameworks (such as Javascript and CSS files for example) also help in this traffic saving that directly helps in improving your site’s performance.
Use images in state-of-the-art formats
We commonly end up using image formats like PNG and JPEG. However, images in formats such as WebP and AVIF tend to have better compression. Using these more modern formats helps a lot in reducing traffic during the loading your website.
Optimize the size of your images
Adjust the images to the sizes used during the display your website they also help to improve performance, for example, if the largest size of an image displayed on your site is 400×300, it makes no sense to have this image 1600×1200.
The browser will first load an image much larger than expected and then take the trouble to convert it to the size you need. Anyway, this will be done for devices with lower resolution. But if you can prevent it from being for all devices, it helps a lot.
Delete files you don’t use
When we use some ready-made templates, we end up with some JavaScript and CSS files that are sometimes not used, however, you end up loading them in the imports you make. Try to leave only the files that are really useful on the site.
Use cache, but wisely
Take advantage of browsers’ caching capabilities to store static resources and prevent them from being reloaded with each view of your page. While part of your site has dynamic content, another part has static content that can be cached and loaded just once instead of being reloaded with every request on your site. But, don’t cache everything.
Use dedicated hosting
Using dedicated hosting for your website makes the competition for machine resources less, and with that your website performance improves compared to shared hosting. Solutions like Web Host VPS help you deliver more speed in requests made to your website
Optimize database connection
many problems of performance on websites occur due to failures both in writing SQL commands for displaying and storing data in your database, as well as using an outdated library or extension to connect to the database, make your website perform less well. Always adjust the indexes to make searching your bank easier.
Use the latest stable versions of the languages and/or frameworks/CMS you use
In addition to being able to contain some serious security flaws, using old or obsolete versions of the language or framework or CMS or library that you use in development of your website make the performance not so good.
Among the structural changes when they release a new version, something is always improved in terms of performance. Therefore, use the latest stable versions to have the best experience.
There are other tips for improve performance, if you liked the topic, just get in touch with us to write another article with more tips. I hope this article can help you and see you soon.
.