Optimization for speed
Speed is crucial for your website. A slow loading website will provide bad user experience, turn away your visitors, rank lower in search engines, and as a final result kill your online endeavour.
What is important for speed?
We have found the following assets of a website need to be taken care of to get the best speed:
1. Reduce the size of your images to the minimum possible and without loosing quality. There are tools for doing this. First you need to use modern image compression formats like jpeg and png. JPEG is good for photos and other graphics, and PNG is very useful when you have text you want to keep readable on the images even when they resize on the responsive website on smaller devices. Sometimes gifs are also used and they need optimization too.
Optimization begins with Photoshop. When you save the image you will be able to choose the file format but also the compression method and rate. Usually for JPEGs we use quality "10" and compression "progressive".
Google webmaster tools provides useful insights on the size and compression of your images. Further optimization is done using google webmaster developer tool "Squoosh". This will reduce further about 2 to 3 times the image files without sacrificing quality.
2. Minify css and js files using a tool called "Minifier" or similar. This will reduce their sizes by removing empty spaces and replacing the variable and function names in js files with shorter ones.
3. Reduce the number of requests pulled from the hosting web server to the minimum possible. This is especially important when using a CMS like Joomla or Wordpress, because they use js and css libraries and other scripts, which are often pulled from the server one by one. When you add a new module, component or plug-in extension, these come with their own scrips and libraries, which exponentially increase the number of requests from the server. You can clearly see the number of requests with Webpagetest you will find in the tools below. Try your website before beginning optimization and after you finish, the requests can be usually decreased from a few hundred to 10 ~ 20, which is the target for a good well optimized website pages.
The number of requests can be reduced by excluding duplicate loading of the same framework css and js libraries and combining existing scripts and libraries into fewer files. This process can be done manually or using a good plugin, like JCH optimization plugin for Joomla or Wordpress.
4. Use GZIP compression on your webserver. This uses a compression protocol between the server and browser to deliver pages faster. Modern CMS like Joomla and WP have embedded GZIP processor, you just need to turn it on.
5. Cache properly your pages on every possible "point for caching". First you need to turn on caching of pages on your webserver. Pages on Joomla and WP will be created or "assebled" each time a page is pulled from the browser of the visitor. With caching turned on pages are dynamically created and then a static copy is cached on the server. Usually a time will be set for expiry of the cache. Each page once cached will be delivered as a static page (much faster), rather than assembled at the user request.
Another "point" of caching is a CDN (Content Distribution Network), which is a server network designed specifically for caching of webpages on a global scale. With a CDN the cached pages will be delivered to the page visitor from the local CDN server, rather sending the request to the original webhosting server each time the same page is pulled. Our favorite CND service is Cloudflare. Apart from being free for the smallest users, its services are professional and as an "extra" you get perfect DDOS protection of your website. To use Cloudflare you need to have access to the management of your domain name, where you will need to change the DNS servers, once you are ready to turn on Cloudflare CDN.
And another "point" of caching is the computer or mobile device of the visitor. Usually a cookie is set that will determine the expiration time for the cached pages. In case a visitor pulls the same page a second time, all images and other important .css and .js files will be loaded from the visitor's computer, without downloading them from the CDN or from the original webhosting server.
Tools to test website pages speed and optimize images and other files
- Page speed test > https://www.webpagetest.org/
- Google speed test > https://developers.google.com/speed/pagespeed/insights/
- Image compressor "Squoosh" > https://squoosh.app/
- Minify .js and .css files > https://www.minifier.org/
- CND and DDOS protection with Cloudflare > https://www.cloudflare.com/
What is TTFB?
Finally we would want to say a few words about the speed of the hosting webserver. The speed of the server is also taken under notice by Google and other search engines, as it impacts the overall speed of the website. The TTFB (time to first byte) is the time it takes from the first request to the server from a user's browser to pull a page until the first byte is received. This time depends on the speed and responsiveness of the webserver and its connectivity to the internet. A fast webhosting server will assemble faster the pages when a CMS like Joomla and Wordpress is used and will deliver shorter TTFB.
Our webhosting service is focused on delivering fast server experience even for the smallest accounts, which are usually using our Shared hosting services. The server is located in the US on the East Coast, in a big Data Center with excellent electricity backups, air conditioning and internet connectivity. The server itself has a 48 core processor and uses RAID-6 SSDs, which makes it very fast. We never over-populate the shared hosting service, so speeds are top even on the smallest plans. This is usually not possible to achieve with big web-hosting providers, which usually overcrowd the shared servers, neither with the cloud service providers, which will demand extra payment for extra resources, including speed.
More about the Data Center we use can be learnt here > https://www.thedomainkiosk.com/we-do-best/business-web-hosting.html